Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2006, 10:41 PM
Authorized User
 
Join Date: Jul 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default Before Close Failure

I am executing a Before_Close event in Workbook (A) that activates workbook (B). Workbook B also has a Before_Close event. After the Workbook A Before_Close event does a lot of initializing for Workbook B, if I simply go thru the End Sub in the Workbook A event, when Workbook B begins, Workbook A does not close. Can someone tell me how I get Workbook A closed and pass control to Workbook B?

Terry
 
Old January 3rd, 2007, 03:09 PM
Registered User
 
Join Date: Jan 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

why not try this code in Workbook (A). Place it after all the code to initialise/open Workbook B...

ThisWorkbook.Close





Similar Threads
Thread Thread Starter Forum Replies Last Post
Browser close when screen saver close Rehanrana Pro VB 6 1 April 7th, 2008 03:09 AM
msoFileDialogSaveAs failure alistair.king Excel VBA 2 January 5th, 2007 08:33 AM
window.close() failing to...well...close! mheathcote Javascript How-To 2 October 31st, 2005 03:02 PM
QueryInterface failure druid2112 General .NET 0 June 28th, 2004 10:43 AM
How do i close pop-up window?: window.close () Burton HTML Code Clinic 2 September 8th, 2003 05:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.