Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to open Save-as window using macros

Status
Not open for further replies.

springy2003

Instructor
Joined
Jan 30, 2003
Messages
67
Location
GB
Any tips?

Thanks.
 
In excel. Forgot to write the software.
 
VBA
Sub SomeName()
Dim fName As String

Do
fName = Application.GetSaveAsFilename
Loop Until fName <> &quot;&quot;
end sub
the above opens the SaveAs dialog and waits until the user puts in the filename, You may have to check for and add a file extension This does not save the file.

Macro
Sub SomeName()
ActiveWorkbook.SaveAs Filename:=&quot;filename&quot;, FileFormat:=xlNormal, Password:=&quot;&quot;, WriteResPassword:=&quot;&quot;, ReadOnlyRecommended:=False, CreateBackup:=False
end sub
filename can be replaced by a variable or cell value


Chris.

Indifference will be the downfall of mankind, but who cares?
 
Macro
Sub SomeName()
'
' FileSaveAs Macro
'
Dialogs(wdDialogFileSaveAs).Show

End Sub

It can word, can't it ?
 
Thanks so much, ChrisHirst and DanielFang.
Springy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top