Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving FileName
This depends on where the user's first and last name is found. But if it's a
username in Excel then something like Sub test() Dim sFile As String sFile = Application.UserName & " " & _ Format(Date, "yymmdd") & ".xls" MsgBox sFile End Sub You can't require anything from users without annoying them too much, but if you construct a thing likte this as a default qualified guess for a "save as" name then you'll get what you want and the users don't have to think or work. HTH. Best wishes Harald "CyndyG" skrev i melding ... How do I creat code that would require the user to save the file in a certain format. Example Cindy Grover 041395.xls This should be a daily prompt using first and last name and the date. The user will be using a template. Also would I create a button on the template that prompts the user? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving FileName
It's possible to use a computer that doesn't have your name anywhere in it.
In those cases the computer can't fill in a username for you. Excel has a username placeholder in the Tools Options General menu. Many people have their name there, others have the company name or just nonsense. That's the "in excel" username used in the code I gave you. Then there's the name of the profile that has logged onto the computer. Only you can tell how to get "Cindy Grover" into your generated filename. It depends on the things above. HTH. Best wishes Harald "CyndyG" skrev i melding ... Thanks Harold. Are you saying to store the user name within an Excel worksheet? "Harald Staff" wrote: This depends on where the user's first and last name is found. But if it's a username in Excel then something like Sub test() Dim sFile As String sFile = Application.UserName & " " & _ Format(Date, "yymmdd") & ".xls" MsgBox sFile End Sub You can't require anything from users without annoying them too much, but if you construct a thing likte this as a default qualified guess for a "save as" name then you'll get what you want and the users don't have to think or work. HTH. Best wishes Harald "CyndyG" skrev i melding ... How do I creat code that would require the user to save the file in a certain format. Example Cindy Grover 041395.xls This should be a daily prompt using first and last name and the date. The user will be using a template. Also would I create a button on the template that prompts the user? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving XLS workbook with set filename | Excel Discussion (Misc queries) | |||
Saving with a filename already in a cell | Excel Programming | |||
Saving with date in filename | Excel Programming | |||
Saving filename same as import filename | Excel Programming | |||
Saving Cell value as filename | Excel Programming |