When I "Save As" I cannot get

T

TroutKing

I wrote a macro to save my documents with the file name that I need, but I
cannot get Excel to prompt me for the desired folder - I always have to
hardcode the folder. What am I doing wrong?

Sub Save()

'NAME AND SAVE SPREADSHEET
ChDir "C:\ExcelOutput\"
NEWFILENAME = ActiveSheet.Cells(1, 2).Value
ActiveWorkbook.SaveAs Filename:=NEWFILENAME & " " & Format (Date,
"mm.dd.yy") & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

End Sub
 

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


Top