Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default set filename to <filename-date on open

I would like to have the filename of a excel WB set to
<filename-currentdate on open the original file so when
the people save it, it will save it to the new name. ie:

open MGA (template file) and make the active WB
MGA-071106 which is a copy of MGA.xls. That way when
the people click Save, it will save it to the new file (they
have problems following simple instructions.

Thanks...


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default set filename to <filename-date on open

Press Alt+F11 to go to the Microsoft Visual Basic Editor
Press CTRL+R to View the Project Explorer
Expand the MGA.xls Project and doubleclick the ThisWorkBook Object
Paste in the following code

Private Sub Workbook_Open()
With Me
.SaveAs .Path & "\MGA-" & Format(Now, "mmddyy") & ".xls"
End With
End Sub

Save and close your workbook



"bob engler" wrote:

I would like to have the filename of a excel WB set to
<filename-currentdate on open the original file so when
the people save it, it will save it to the new name. ie:

open MGA (template file) and make the active WB
MGA-071106 which is a copy of MGA.xls. That way when
the people click Save, it will save it to the new file (they
have problems following simple instructions.

Thanks...



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default set filename to <filename-date on open

Thanks, is there a way to replace the "\MGA" with the filename of the
opened
template file? I have different ones, MGA, RVA etc. Also, how do I set
the new file not to run the macro? I only want the people to have the macro
run from the template file. If they reopen a saved file, I want it to stay
as
that filename.





"Hayeso" wrote in message
...
Press Alt+F11 to go to the Microsoft Visual Basic Editor
Press CTRL+R to View the Project Explorer
Expand the MGA.xls Project and doubleclick the ThisWorkBook Object
Paste in the following code

Private Sub Workbook_Open()
With Me
.SaveAs .Path & "\MGA-" & Format(Now, "mmddyy") & ".xls"
End With
End Sub

Save and close your workbook



"bob engler" wrote:

I would like to have the filename of a excel WB set to
<filename-currentdate on open the original file so when
the people save it, it will save it to the new name. ie:

open MGA (template file) and make the active WB
MGA-071106 which is a copy of MGA.xls. That way when
the people click Save, it will save it to the new file (they
have problems following simple instructions.

Thanks...





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
Double-CLK open appends a number to filename JeffSanders Excel Discussion (Misc queries) 1 March 20th 06 08:01 PM
CSV formatted files open odly in Excel 2000 Janski Excel Discussion (Misc queries) 3 November 24th 05 07:58 PM
Why doesn't the File Open list sort into filename order? cycler New Users to Excel 7 July 16th 05 06:44 PM
Can Only open files using file ~ open tek4u Excel Discussion (Misc queries) 4 July 11th 05 05:31 PM
Insert value of a cell as a filename Ralph Howarth Excel Worksheet Functions 0 January 18th 05 12:03 AM


All times are GMT +1. The time now is 09:35 PM.

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"