Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying Worksheet triggers Click event of combobox

Hello,
I have worksheet("stuff") it has a combobox with a
click or change event. I have a worksheet("Template") I
make a copy of it with code or by hand.

The comboboxs in workSheet("Stuff")click or change events
fire off.

I have tried Application.EnableEvents = False.
Still the combobox events fire.

Any Idea how to stop this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copying Worksheet triggers Click event of combobox

EnableEvents is in the Excel object model. Comboboxes are in the MSForms
object model, so enableevents does not affect their events. You could set
up the events to look at a global variable and exit if it is set, then set
it before you do the copy.

In a general module

Public HaltEvent as Boolean

Sub Preventevent()
HaltEvent = True
End Sub
Sub AllowEvent()
HaltEvent = False
End Sub


in the event code

Private Sub combobox1_click()
if HaltEvent then Exit Sub
' existing code
End Sub

--
Regards,
Tom Ogilvy

Copying Worksheet triggers click event on combobox wrote
in message ...
Hello,
I have worksheet("stuff") it has a combobox with a
click or change event. I have a worksheet("Template") I
make a copy of it with code or by hand.

The comboboxs in workSheet("Stuff")click or change events
fire off.

I have tried Application.EnableEvents = False.
Still the combobox events fire.

Any Idea how to stop this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying Worksheet triggers Click event of combobox

Posting reply only to cut down length of "last poster" - Nice job by the
way, Mr. Copying Worksheet triggers Click event of combobox.


---
Message posted from http://www.ExcelForum.com/

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
Combobox Click event triggered when copying worksheet Tom Ogilvy Excel Programming 2 June 30th 05 04:54 PM
Copying Worksheet triggers Click event of combobox on another worksheet Robert[_20_] Excel Programming 0 January 23rd 04 07:40 PM
Click event on cell triggers a macro kris Excel Programming 2 November 13th 03 10:42 AM
combobox change event scrabtree23[_2_] Excel Programming 3 October 20th 03 05:56 PM
ComboBox Event Procedure problem Brent McIntyre Excel Programming 1 September 18th 03 02:01 PM


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