View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default InpurBox & Directory

I would use an Input; use the Application.GetSaveAsFilename instead. e.g.

Dim FileName As String
Const FilePath As String = "R:\Daily Revenue Report\Daily Revenue\"

ChDrive FilePath
ChDir FilePath

FileName = Application.GetSaveAsFilename

Read the Help for how to use this and check for a valid response.

NickHK

"SuperLC" wrote in message
...
With the VBA below, what code do I insert and where so that the file can

be
saved in this directory ~ "R:\Daily Revenue Report\Daily Revenue\" ?

ActiveWorkbook.SaveAs Filename:=InputBox( _
prompt:="PLEASE ENTER NEW FILENAME ", _
Default:="Yesterday's Date"), CreateBackup:=True

Greatly appreciate any and all assistance from anyone! :-)

P/S - A Happy New 2007 to one & all :-)