470,594 Members | 1,385 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

Spreadsheet Maker Form

I have learned a bit about vb recently and have been using it for my job, I still have questions and dont know how to do many things yet.
I appreciate your time and efforts and hopefully I can figure out how to make this procedure work.

This is all taking place in vb6 and excel 2003.

I am making a userform that is activated once the user highlights a bit of spreadsheet and clicks a button on the command bar, here is what I want it to do:

1. (copy data from the spreadsheet
this is tricky because I am trying to have it be a conditional situation where the user highlights a place on the spreadsheet and whatever that place is at the moment, it will get copied to a variable on the form.
There are 8 fields to highlight and copy, two with info that wont be copied onto the new spreadsheet but will be used to update fields and make the filename.)

2. make a new spreadsheet:
a. the filename is made from cell values in the 'from' and 'to' columns and the date.

b. new spreadsheet needs to have a template section from a7:f7 that has 4 fields that will be filled in from the fields on the form.

c. copied data is to be moved from old spreadsheet to new spreadsheet to cell a8. There should be 6 columns that will be filled with data.

3. on the form there will be a browse button to save the file in a location specified by user and 'last saved location' name should be saved to a textbox.

I read about a browse button here that I would like to use, but I have to adapt it so it can be used in the 'browse' button. http://www.tek-tips.com/viewthread.cfm?qid=1396007

I dont even know if it is possible to copy a user-specified range. It seems that it should be, because when a user highlights an area, that area is being held in memory as a position... I tried passing these values to another sheet but it wasnt successful. I tried to dim 'selection' as string and pass it into a variable, but I am new to variables and this project is a big experience for me in vb.

I also am still learning about how to make values in a field pass to another field on a spreadsheet.

Any examples of how to do any of this is much appreciated.
Sep 7 '07 #1
1 1710
Here is where my file may be located:

I Ok. So everything was quite confusing before I put this into practice.

Im interested in having a dynamic selection process that the user can select a contiguous set of cells and the program will deal with routing the right values to the right columns.

I think that must be possible...

To circumvent that, I was thinking about just having an input box where the user can specify what range they want, and then the 'Mapping' of values can occur.

The program does not need much validation as it will be used by users who will be using the files they just made right after creating them.

I have made the code as much as I can understand how to make at this point.
Sep 10 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by javatiger | last post: by
4 posts views Thread by john andrew | last post: by
3 posts views Thread by Brooke | last post: by
9 posts views Thread by Audrey | last post: by
1 post views Thread by Bill Atkins | last post: by
2 posts views Thread by franc sutherland | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.