View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Display message during save operation

Jan,

Try this BeforeSave alternative, it should take care of both issues

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim sFile
Application.EnableEvents = False
MsgBox "This may take a while"
Cancel = True
If SaveAsUI Then
sFile = Application.GetOpenFilename("Excel Files (*.xls), *.xls")
If sFile < False Then
ThisWorkbook.SaveAs sFile
Worksheets("Startup").Activate
End If
Else
ThisWorkbook.Save
orksheets("Startup").Activate
End If
Application.EnableEvents = True
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Excelerate-nl" wrote in message
...
Dear Experts,

I would like to display a message during a save operation of a sheet (it

is
quite a large file so it takes a while).
There is another thing related to this: When a user starts this

spreadsheet
without enabling the macro's, the workbook is opened with a sheet showing

a
text box with the message "Please reopen with macro function on". In the
BeforeSave event macro I activate this sheet with the text box (so it will

be
shown on next start up). However this results in the display of the text

box
"Please reopen with macro function on" during a save operation (which is
quite confusing).

Please help,

Jan Bart