Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Closing an Excel Spreadsheet via command button

Currently running Excel 2003
I have an excel program that I created for my wife's business that I
want to exit via an "exit button" without having any more user
interface. I can't seem to get past the standard excel message "Do
you want to save this file? ........Yes....No.......Cancel"
I just want to exit, no questions asked leaving the program intact.
Any Ideas?

Also, does anyone know of a website or place I can go to view excel
programs that demonstrate vba programs using the different uses of
UserForms and command buttons?

Thanks for any help you can shed on this.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Closing an Excel Spreadsheet via command button

This will work without saving workbook
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True

This will work with saving workbook
Application.DisplayAlerts = False
ActiveWorkbook.save
ActiveWorkbook.Close
Application.DisplayAlerts = True

" wrote:

Currently running Excel 2003
I have an excel program that I created for my wife's business that I
want to exit via an "exit button" without having any more user
interface. I can't seem to get past the standard excel message "Do
you want to save this file? ........Yes....No.......Cancel"
I just want to exit, no questions asked leaving the program intact.
Any Ideas?

Also, does anyone know of a website or place I can go to view excel
programs that demonstrate vba programs using the different uses of
UserForms and command buttons?

Thanks for any help you can shed on this.

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
Adding a command button to open another spreadsheet Joel Excel Programming 1 October 17th 07 06:09 PM
Getting an ActiveX command button to do a spreadsheet function Givvie Excel Worksheet Functions 4 August 28th 07 11:18 AM
Send Open Spreadsheet using Command button [email protected] Excel Discussion (Misc queries) 0 August 23rd 07 01:08 PM
Deleting a Command Button from my Spreadsheet DDrowe Excel Discussion (Misc queries) 2 November 7th 06 01:49 PM
I can't insert a Command Button into my spreadsheet Stephen238 Excel Programming 3 June 30th 05 08:43 PM


All times are GMT +1. The time now is 11:41 PM.

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

About Us

"It's about Microsoft Excel"