Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Open workbook on close

If you're talking about closing a specific Workbook then you could use
this

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Workbooks.Open "C:\FileToOpen.xls"
End Sub

This VBA code would need to be placed in the "ThisWorkbook" part of the
file that is being closed.

C_Ascheman wrote:
Is there a way to detect when the small x in the upper right corner of the
worksheet is clicked on, and as it is closing to open a predifined worksheet
up. We have a workbook containing 5 worksheets. A completely blank version of
the workbook is stored on the server. If one of our employees is working on
any of the worksheets with in that workbook, and clicks on the worksheet x is
it possible to open the blank workbook as that old one is closing?

C_Ascheman


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
Open and Close another Workbook from VBA Charles in Iraq Excel Programming 3 November 27th 06 09:11 AM
Before close and workbook open! Marc[_20_] Excel Programming 1 March 17th 05 01:06 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
Close Open Workbook David Coleman Excel Programming 1 December 30th 03 05:53 PM
Close Open Workbook Bob Umlas[_3_] Excel Programming 1 December 30th 03 05:50 PM


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