Method userform of Excel
The Excel method
* Displays the Save As dialog box and allows selection of a file
* Returns a file name and route, but does not initiate any action. Syntax
original file name: Optional (specify the file name)
File Filter: Optional. a string specifying file filtering criteria
FilterIndex Optional. The default index numbers
Title. Optional. The title of the dialog box
ButtonText
.
Macintosh only
method Example of use of Excel
GetSaveAsFileName Sub
GetSaveasFilename ()
fileSaveName As String Dim
Application.GetSaveasFilename fileSaveName = (FileFilter: = "Excel Files (*. xls), *. xls") If fileSaveName
<> False Then
ActiveWorkbook. SaveAs (fileSaveName)
MsgBox "The workbook is saved in:" &
fileSaveName
End If End Sub
0 comments:
Post a Comment