Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Close WorkBook with CommandButton

I thought is was good until I actually started playing with th
workbook. The result are not what I'm trying to achieve. If I clic
yes on the save dialog box it brings up excels save dialog box. If
click on no or cancel it works fine
The code I have been working with is:

Private Sub CommandButton3_Click()
' Tried using Application.DisplayAlerts = False
Application.ScreenUpdating = False
With ActiveWorkbook
.RunAutoMacros xlAutoClose
.Close
End With
End Sub

I'm trying to incorporate my Workbook_BeforeClose code, then exi
excel. I was also wondering if there was a way to close excel whe
closing the workbook. I have read in the newsgroup to us
Application.Quit but like the rest I can't figure out how to apply it.


If anyone has any suggestion, please reply

Thanks

Rocke

--
Message posted from http://www.ExcelForum.com

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
CommandButton to open a Excel workbook aussiegirlone Excel Discussion (Misc queries) 2 March 25th 09 01:34 AM
workbook before close mohavv Excel Discussion (Misc queries) 2 November 21st 07 01:27 AM
close only one workbook bobsmom70601 New Users to Excel 1 March 8th 05 09:43 PM
How can I close only 1 workbook when I have many open? jpt consulting Excel Discussion (Misc queries) 3 November 30th 04 11:58 PM
cannot close workbook chrisneill Excel Programming 3 July 13th 03 11:10 PM


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