Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Generic Event Handler Hanging. Need help

I have a form that has a lot of checkboxes on it. To make things simple I
used a generic event handler technique that I learned about on this forum.
I've included the code for my event handler below.

Now I want to pop-up another form when one of these checkboxes are selected
(firing off the event handler). Every time I insert code in the event
handler to show the other form, Excel hangs chewing up 100% of the CPU. I
cannot figure out what's going on.

My end goal is to pop-up annother simple form to collect two pieces of
information and then pass it back to the main form when the second form is
unloaded. I'm not really sure the best way to pass data between forms
either.

Does anyone have any ideas how to do this or what I'm doing wrong?


---------- Checkbox Event Handler --------------------
Public WithEvents BoxGroup As MSForms.CheckBox

Private Sub BoxGroup_Click()
Dim Player As String
Dim iCheckbox As MSForms.CheckBox
Dim iLabel As MSForms.Label
Dim iTextbox As MSForms.TextBox

Player = Right(BoxGroup.Name, 4)
Set iCheckbox = ScoresInputForm.Controls("Q" & Player)
Set iLabel = ScoresInputForm.Controls("L" & Player)
Set iTextbox = ScoresInputForm.Controls("S" & Player)


If BoxGroup.Value = True Then
' Disable entering this week's scores for this player
iTextbox.Value = ""
iLabel.Tag = iLabel.Caption
iLabel.Caption = "Substitute"
Userform1.Show ' <= It hangs here
iTextbox.Enabled = False
iTextbox.BackColor = &H8000000B
Else
' Re-eanble entering score for this player
iLabel.Caption = iLabel.Tag
iTextbox.Enabled = True
iTextbox.BackColor = &H80000005
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
generic checkbox click form event handler? fedude Excel Programming 11 April 9th 08 02:34 PM
What can inhibit an event handler? Al Excel Programming 3 March 30th 08 12:32 AM
Event handler VBA Noob[_4_] Excel Programming 4 April 26th 06 03:49 PM
Autoshape event handler? [email protected] Excel Programming 7 February 23rd 06 10:12 PM
Generic ComboBox change event steve Excel Programming 7 October 14th 03 07:30 PM


All times are GMT +1. The time now is 12:15 PM.

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"