Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to re-enable events after a VB error in Excel?


Hi - I had the same problem. Resetting after an error left the
SheetSelectionChange event handling I implemented in an Add In (see
'Application Events' (http://www.cpearson.com/excel/AppEvent.aspx)) not
working.

The work around was to relaunch Excel. Here's how I fixed it ...



In my Add in ThisWorkbook code I have:

Private XLApp As CExcelEvents

Public Sub Workbook_Open()
Set XLApp = New CExcelEvents
End Sub


I found that if you run this Workbook_Open sub after an error the event
triggering works again. In my vb app I added a menu item that called it
so the user can fix it.

Private Sub ResetEvents()
ThisWorkbook.Workbook_Open
End Sub


Hope this helps.


--
lesco_quartz
------------------------------------------------------------------------
lesco_quartz's Profile: http://www.thecodecage.com/forumz/me...hp?userid=1198
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=148822

Microsoft Office Help

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
Enable Multiple events in the same time rchiuhk Excel Programming 6 October 9th 09 11:22 AM
Help with Enable Macro Error Msg (Excel 2007) DW Excel Programming 10 March 14th 07 06:38 PM
Enable/Disable CommandBar Buttons Based on Events M. Authement Excel Programming 11 October 19th 06 02:46 AM
combobox change event is running when enable events is false tysop Excel Programming 3 January 24th 06 02:16 PM
Enable events John C[_6_] Excel Programming 6 January 24th 04 01:44 PM


All times are GMT +1. The time now is 10:48 AM.

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"