InpurBox & Directory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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 :-)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top