Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tim C
 
Posts: n/a
Default Dialogue Box - how do I get and save as file name entered?

I save a copy of an updated excel file each day to the same directory. I
want to create a macro that prompts for the daily file name and saves it to a
predetermined file location. THanks.
--
Tim C
  #2   Report Post  
bigwheel
 
Posts: n/a
Default

"Tim C" wrote:

I save a copy of an updated excel file each day to the same directory. I
want to create a macro that prompts for the daily file name and saves it to a
predetermined file location. THanks.
--
Tim C


Use a modified version of this (no error checking added):-

Sub SaveMe()
myFileName = InputBox("Enter filename") & ".xls"
myDir = "C:\" 'enter correct path name
ActiveWorkbook.SaveAs Filename:= _
myDir & "\" & Filename, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
end sub





  #3   Report Post  
Tim C
 
Posts: n/a
Default

Thank you!
--
Tim C


"bigwheel" wrote:

"Tim C" wrote:

I save a copy of an updated excel file each day to the same directory. I
want to create a macro that prompts for the daily file name and saves it to a
predetermined file location. THanks.
--
Tim C


Use a modified version of this (no error checking added):-

Sub SaveMe()
myFileName = InputBox("Enter filename") & ".xls"
myDir = "C:\" 'enter correct path name
ActiveWorkbook.SaveAs Filename:= _
myDir & "\" & Filename, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
end sub





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



All times are GMT +1. The time now is 03:53 PM.

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

About Us

"It's about Microsoft Excel"