Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default how to create a macro button to exit a program

I am trying to set up a menu page at the beginning of my workbooks. The
buttons I have a Enter School Data, Manipulate Data, Print Reports,
Completion on time, Print Charts, New Referrals, Blank Button, Exit program.
How do I get the exit button to work. To be honest I could not get the
macros to work with the other buttons, so I used hyperlink, but am stuck on
this one. Any suggestions please, I am desparate.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default how to create a macro button to exit a program

This tutorial is pretty helpful:
http://www.anthony-vba.kefra.com/vba...ur_First_Macro


Code should be something like this:
Sub ExitNow()
Application.DisplayAlerts = True
Application.Quit
End Sub


After you have your code in a module follow these steps:
Right-click in the toolbar area, click 'Forms', click on the Button, drag
the mouse and set the size of the button, in the box that open click the
macro name (ExitNow), and the click OK.

Regards,
Ryan--

--
RyGuy


"PACEBIT0708" wrote:

I am trying to set up a menu page at the beginning of my workbooks. The
buttons I have a Enter School Data, Manipulate Data, Print Reports,
Completion on time, Print Charts, New Referrals, Blank Button, Exit program.
How do I get the exit button to work. To be honest I could not get the
macros to work with the other buttons, so I used hyperlink, but am stuck on
this one. Any suggestions please, I am desparate.

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
How can I exit a workbook in Excel without closing the program? cosborn Excel Discussion (Misc queries) 1 September 21st 06 09:19 PM
Disable Exit button on a UserForm Noemi Excel Discussion (Misc queries) 1 September 14th 06 09:37 PM
Can only exit the program from the file menu Chuck Bowser Excel Discussion (Misc queries) 1 April 11th 06 03:08 PM
How do i create a command button or macro to exit Microsoft Excel raj Excel Worksheet Functions 1 April 30th 05 02:17 PM
I can't turn off excel programs with the exit button. What is up. tom moore Excel Discussion (Misc queries) 1 January 15th 05 12:12 AM


All times are GMT +1. The time now is 05:15 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"