Not sure I gave enough code to explain what my problem is, so I have
included the code from the click event:
Normally when I click on OptionButton2201 I want the click event to run, but
when I edit TextBox2203 and the code under Else runs (setting the
OptionButtons) I do not want tit to trigger the OptionButton click event.
The reason I do not want it to run is because then the OptionButton click
events clears TextBox2203.
I know this is not the most efficient coding but it is what I am capable of
at this time.
Private Sub TextBox2203_Change()
If Me.Visible = False Then Exit Sub
Me.TextBox2203 = UCase(Me.TextBox2203.Text)
If TextBox2203.Value <> rng1(1, 7) Then
If OptionButton5001.Value = True Then
GoTo Skip
End If
OptionButton2201.Value = False
OptionButton2202.Value = False
OptionButton2203.Value = False
OptionButton2204.Value = False
OptionButton2205.Value = False
OptionButton2206.Value = False
Frame11.BackColor = &H80FFFF
Frame11.BorderColor = &HFF&
ComboBox2201.Value = ""
ComboBox2202.Value = ""
ComboBox2201.BackColor = &H80FFFF
ComboBox2202.BackColor = &H80FFFF
Else
Frame11.BackColor = &H8000000F
Frame11.BorderColor = &H80000012
If rng1(1, 8) = "NO" Then
OptionButton2201.Value = True
If rng1(1, 8) = "YES" Then
OptionButton2202.Value = True
End If
If rng1(1, 8) = "NO PHONE" Then
OptionButton2203.Value = True
End If
If rng1(1, 8) = "LEFT MESSAGE" Then
OptionButton2205.Value = True
End If
If rng1(1, 8) = "NOT CALLED" Then
OptionButton2206.Value = True
End If
ComboBox2201.BackColor = &H80000005
ComboBox2202.BackColor = &H80000005
ComboBox2201.Value = rng1(1, 16).Text
ComboBox2202.Value = rng1(1, 15).Text
End If
TextBox2203.BackColor = &H80000005
TextBox2203.SetFocus
GoTo Done
Skip:
TextBox2203.BackColor = &H80000005
Done:
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub OptionButton2201_Click()
'No
If Me.Visible = False Then Exit Sub
TextBox2203.Value = ""
TextBox2203.BackColor = &H80FFFF
OptionButton2201.Value = True
TextBox2205.Value = Now()
Me.TextBox2205.Value = Format$(Now(), "ddd dd mmm yy")
TextBox2212.Value = Now()
Me.TextBox2212.Value = Format$(Now(), "HH:MM")
Frame11.BackColor = &H8000000F
Frame11.BorderColor = &H80000012
End Sub