Thread: SAVE AS MACRO
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default SAVE AS MACRO

Add this code to the bottom

ActiveWorkbook.SaveAs flToSave, flFormat
OR
ActiveWorkbook.SaveCopyAs flToSave

If this post helps click Yes
---------------
Jacob Skaria


"Neil Holden" wrote:

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...")