Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default Combo Box Event code self triggering??

I have a few workbooks that have combo box controls on them which trigger
some VBA when a change is made by the user. Each workbook on it's own works
fine. When I open a 2nd workbook, for some reason the event code in the
Private Sub of the already opened workbook gets triggered. Why would this
happen? Why doe's opening a 2nd workbook trigger changes in the original?

On a related note, when I open a singel workbook, without the user making
any changes the event code executes. I'm guess that during the initial
calculation the linked cell value is getting updated which changes the
control which activates the code.

When I debug I can see that thisworkbook.name < activeworkbook.name.

Here's an example of the Control code:
Private Sub Selector_Market_Change()
If Not ImBusy Then
ImBusy = True
Application.ScreenUpdating = False
theCell = Selection.Address
Sheets("Params").Range("theBenchmark") =
Sheets("Params").Range("theBenchmarkCalc") 'I get an error here since the
range doesn't exist in the new book.
Call Get_Data1
Range(theCell).Select
ImBusy = False
End If
End Sub

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
Load a ComboBox without triggering another event Dan Excel Programming 2 May 8th 07 07:21 PM
Userform combo box triggering macros michaelberrier Excel Discussion (Misc queries) 6 June 10th 06 01:25 PM
Workbook Open Event not triggering Mike Jerakis[_2_] Excel Programming 3 January 3rd 06 09:12 PM
Triggering click event of a menu in vba steve Excel Programming 4 August 19th 03 06:17 PM
Triggering click event of a menu in vba Tom Ogilvy Excel Programming 0 August 18th 03 07:51 PM


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