Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programing a Save Function in Excel using VBA

Status
Not open for further replies.

Hornet2433

Technical User
Jul 23, 2003
8
0
0
US
Help!! I am at the final steps of a new program I am writing in excel using VBA, but I am stuck. I need to have a function that when the user clicks the save button (on the worksheet) a "save as" file is created.
I do not want the user to be able to alter the original program as they will have to use it to create other proposals in the future, but I do want them to be able to open a previously saved proposal. Any suggestions? Would a scenario be best? SaveCopyAs? I am going crazy! [sadeyes] Thanks
 
Do you have a Unique name to save this file as?
You will have to hard code the name of the original file so that when the copy opens and then saved, does create an unwanted second copy.

OR, you can skip all the crap I have said and Password protect your VBA project then save the worksheet as Template. File->Save As. Place that template in your users shared templates. Each time they open that template, they will be creating copy. If the template name is Love.xlt, each time the use opens it 'love1.xls', 'love2.xls' will be created and so on.

Hope I helped...



[cheers]
 
That is a great start, but one more question...

is there a way i can make am input box that the user can name this file?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top