Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Dave Doc
 
Posts: n/a
Default Writing a macro that will exit a spreadsheet

Hi there.

I am designing a spreadsheet and have various macros running, print, save
etc, allocated to buttons on the sheet. However I would like to have a macro
that also exits the spreadsheet when I run it, unfortunately when I try and
record the macro I exit ok but the macro doesn't record. Any tips please?
  #2   Report Post  
Posted to microsoft.public.excel.newusers
ufo_pilot
 
Posts: n/a
Default Writing a macro that will exit a spreadsheet

I'm no expert, still learning the macro stuff myself,.
This has worked for me though... also upon a button_click Command.
this one saves first, then exits.

Sub SaveClose()
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub


"Dave Doc" wrote:

Hi there.

I am designing a spreadsheet and have various macros running, print, save
etc, allocated to buttons on the sheet. However I would like to have a macro
that also exits the spreadsheet when I run it, unfortunately when I try and
record the macro I exit ok but the macro doesn't record. Any tips please?

  #3   Report Post  
Posted to microsoft.public.excel.newusers
Dave Doc
 
Posts: n/a
Default Writing a macro that will exit a spreadsheet

Absolutely fantastic ufo_pilot!!!

You're a star, thank you very much

Dave Doc

"ufo_pilot" wrote:

I'm no expert, still learning the macro stuff myself,.
This has worked for me though... also upon a button_click Command.
this one saves first, then exits.

Sub SaveClose()
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub


"Dave Doc" wrote:

Hi there.

I am designing a spreadsheet and have various macros running, print, save
etc, allocated to buttons on the sheet. However I would like to have a macro
that also exits the spreadsheet when I run it, unfortunately when I try and
record the macro I exit ok but the macro doesn't record. Any tips please?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Writing Macro for extracting info from other softwares Skywalker Excel Discussion (Misc queries) 0 October 15th 05 04:02 AM
Prevent A Macro From Running If SpreadSheet is Filtered carl Excel Worksheet Functions 1 June 22nd 05 04:04 PM
insert rows in excel spreadsheet via macro Floyd Elkins Excel Worksheet Functions 3 May 24th 05 05:51 PM
Run a macro when opening a spreadsheet Duncan Help Excel Discussion (Misc queries) 5 January 10th 05 06:33 PM


All times are GMT +1. The time now is 10:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"