B
bmm
Hi,
How can I trap the file save as /save event and get the filename entered in
the dialogbox?
I tried to get the file name in "Workbook_BeforeSave() " event, but it
displays the dialog twice FileSave As dialog twice.
How can i avoid that dialog appearing twice
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Application.EnableEvents = False
filesavename = Application.GetSaveAsFilename( _
fileFilter:="Microsoft Excle Files Files (*.xls), *.xls")
If filesavename <> False Then
filesavename = filesavename
End If
Application.EnableEvents = True
Cancel = True
MsgBox filesavename
End Sub
How can I trap the file save as /save event and get the filename entered in
the dialogbox?
I tried to get the file name in "Workbook_BeforeSave() " event, but it
displays the dialog twice FileSave As dialog twice.
How can i avoid that dialog appearing twice
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Application.EnableEvents = False
filesavename = Application.GetSaveAsFilename( _
fileFilter:="Microsoft Excle Files Files (*.xls), *.xls")
If filesavename <> False Then
filesavename = filesavename
End If
Application.EnableEvents = True
Cancel = True
MsgBox filesavename
End Sub