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: 54
Default preventing comboboxes from triggering when sheet copied

I have 2 comboboxes that are triggering when ever I copy the sheet to
a new sheet or delete a sheet. This is generating errors. I also
have a workshet_selectionCange and have isolated that this is
triggering the 2 combo routines even though the combos are based on a
Click event.
The linked cell and reference range of the 2 comboboxes do not refer
to the cells in the module below. The combobox code is in each sheet
not a module.

How can I modify my code to prevent the combos from triggering when a
new sheet is added, deleted, etc.


in the worksheet:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
jfactor
End Sub



in a module:
Sub jfactor()
'Application.EnableEvents = False
If Cells(27, 2).Value = 0 Then
Cells(28, 2).Value = ""
ElseIf Cells(28, 2) = "" Then '<==== ADD THIS CODE
Cells(28, 2).Value = 1000 'whatever the default value is
End If
' Application.EnableEvents = True
End Sub
 
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
Looping through different comboboxes in an excel sheet [email protected] Excel Programming 2 September 20th 07 09:20 PM
Triggering an event whenever a new shape is added in a sheet Sagittarian Excel Programming 1 June 21st 07 12:59 AM
Preventing incorrect data from being copied TimN Excel Programming 8 August 2nd 06 11:05 PM
Fire events for all comboboxes in my sheet Ardus Petus Excel Programming 2 June 9th 06 12:24 PM
Preventing a workbook from being copied CiaraG[_4_] Excel Programming 1 March 4th 04 01:24 PM


All times are GMT +1. The time now is 08:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"