PC Review


Reply
Thread Tools Rate Thread

Closing an Excel Spreadsheet via command button

 
 
bartlwf@aol.com
Guest
Posts: n/a
 
      15th Feb 2008
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 With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      15th Feb 2008
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

"(E-Mail Removed)" 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Button to open a password protected excel spreadsheet james Microsoft Access Forms 0 22nd Feb 2010 11:04 AM
Command Button to open a password protected excel spreadsheet james Microsoft Access Form Coding 0 22nd Feb 2010 11:03 AM
Command button save Excel spreadsheet in tab delimeted format M G Henry Microsoft Access Forms 1 9th Jul 2008 12:27 AM
VBA - using command button to copy userform text boxes to excel spreadsheet stevehorton Microsoft Excel Misc 2 21st Jul 2004 01:40 PM
Command Button for closing form A Hewitt Microsoft Access Form Coding 1 10th Dec 2003 12:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:43 AM.