View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Macro Button and Closing Excel

Close it with something like:

Sub hfsja()
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
End Sub

--
Gary''s Student - gsnu200775


"Nils Titley" wrote:

I created a Macro Button that I placed in the standard group of buttons and I
assoicated a Macro with it. Later I started Excel with a blank workbook. I
pushed the new macro button and the macro worked. It also opened the excel
workbook (Lift Logger) where the macro is stored. When I went to close the
Lift Logger workbook, I was asked, "Do you want to save the changes you made
to 'Lift Logger.xls'?

Well I did not make any changes to Lift Logger.xls? But more importantly,
1) Is there a way to surpress the opening of the Lift Logger.xls when I run
the macro in this manner? 2) Can I surpress the close message box?

If both or one are true, how and where do I put the code. It must be in the
macro some place. Please be aware that I am displaying some msgboxs in my
macro.

Thanks for your help.