Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving XLS workbook with set filename levertonfamily Excel Discussion (Misc queries) 0 November 16th 06 05:52 PM
Saving with a filename already in a cell Dale Walker Excel Programming 1 November 2nd 04 05:07 PM
Saving with date in filename Ben Allen Excel Programming 3 April 26th 04 09:05 AM
Saving filename same as import filename Matt Excel Programming 4 February 24th 04 03:01 PM
Saving Cell value as filename Kathy B Excel Programming 1 July 24th 03 10:59 PM


All times are GMT +1. The time now is 01:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"