Thread: SAVE AS MACRO
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default SAVE AS MACRO

That just gets a path, you have to explicitly save it

Activeworkbook.SaveAs flToSave

--
__________________________________
HTH

Bob

"Neil Holden" wrote in message
...
Hello Gurus, I am trying to create a macro so when the user clicks the
save
as command box will appear and then they type in the file name and save.

The code below brings the save as prompt up but doesn't save : (

Please help.

Dim flToSave As Variant 'brings up save as dialogue filling in file
name
with Job number
Dim flName As String
Dim flFormat As Long

flFormat = ActiveWorkbook.FileFormat

flName = Sheets("summary").Range("f7").Value & _
" " & Sheets("summary").Range("f8").Value & " " & "CHR for
Monthly Update" & ".xls"
flToSave = Application.GetSaveAsFilename(flName, filefilter:="Excel
Files (*.xls),*.xls", _
Title:="Save File As...")