LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Problems with the OnWorkbookClose() Event

Hi all

Im trying to prevent the OnWorkbookClose() event from running by
setting the cancel flag to true, however after this the program just
hangs for until i stop the debugger.

Current Code is...

STDMETHODIMP CAppEventListener::HandleBeforeWorkbookClose(IDisp atch*
xlBook, VARIANT_BOOL* fCancel)
{
*fCancel = VARIANT_TRUE;
HRESULT hr = S_OK;
return hr;
}

I cant see exactly where the problem is but im sure its in this
function somewhere. This function is called when the
BeforeWorkbookClose() Event is fired.

Any help you guys might be able to offer would be greatly apreicated

Joel

 
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
MenuBar & Event problems Graham F Excel Discussion (Misc queries) 1 May 7th 06 10:26 AM
change event problems John Excel Programming 4 December 13th 05 05:58 PM
problems with Add-In event procedures when moving WB files between computers jon Excel Programming 2 April 29th 04 04:47 PM
Problems with event handlers Italian Job Excel Programming 2 November 12th 03 01:26 AM
If... Then Loop problems in Worksheet Event TB[_3_] Excel Programming 2 August 4th 03 08:45 AM


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