Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Need VB formula to exit workbook

Hello,

I need a VB formula to exit workbook. When pressed to close button on
the form, I want the whole workbook saved and closed. Please help

Thanks

Dave
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 621
Default Need VB formula to exit workbook

VBA does not deal in formulas. I think you need a macro.

Sub closer()
Application.DisplayAlerts = False
With ActiveWorkbook
.Save
.Close
End With
Application.DisplayAlerts = True
End Sub


Gord

On Tue, 24 Jan 2012 12:43:13 -0800 (PST), dave
wrote:

Hello,

I need a VB formula to exit workbook. When pressed to close button on
the form, I want the whole workbook saved and closed. Please help

Thanks

Dave

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 to set auto protect workbook on exit? West Excel Worksheet Functions 4 October 2nd 06 03:19 AM
Exit Workbook Mark Excel Programming 2 August 17th 05 05:35 AM
[Fwd: Run macro on exit worksheet/workbook] toontje Excel Discussion (Misc queries) 1 August 5th 05 03:49 AM
Run macro on exit worksheet/workbook toontje Excel Worksheet Functions 3 August 2nd 05 10:15 PM
Force no save on workbook exit R A Excel Programming 2 December 16th 04 05:07 PM


All times are GMT +1. The time now is 08:19 AM.

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"