Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to record a macro which will automatically close my workbook from
an assigned button. When I begin the recording process and then perform the
action of closing the workbook the macro is also closed and I cannot complete
the process. When I re-open my workbook the macro has not been created. Any
suggestions of a way around this would be much appreciated.
 
Hi
Depending on whether you want to save your workbook before closing it:
Thisworkbook.Close(True)
Or not
Thisworkbook.Close(False)

HTH
Cordially
Pascal
 
Fantastic! I've spent all day trying to figure this one out and you've
probably saved me many more days. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top