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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Dynamic Workbook Saving As 1

Status
Not open for further replies.

Adnane

Technical User
Apr 22, 2003
88
EU
Hi,

what i'm trying to have is to get the customer's name (entered by the user in a form) ang save the workbook as "FileName_CustomerName.xls" where the FileName doesn't change and it's always saved in the same location.

Regards,

Adnane

Micorosft North Africa
 
Hi Adnane,

This will prompt the user and save the workbook:

Code:
Dim CustomerName As String
CustomerName = InputBox("Enter Customer Name")
ActiveWorkbook.SaveAs "C:\FileName_" & CustomerName & ".xls"

If you already have your Form then you could put the SaveAs in code behind the form or a button on the form or the textbox where the name is entered. Come back if you want something more specific along those lines.

Enjoy,
Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top