View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
John John is offline
external usenet poster
 
Posts: 2,069
Default TextBox_Change() problem

when I encounter similar problem I just place a one liner in the change event
crude but seems to work!

Private Sub TextBox1_Change()

If Me.Visible = False Then Exit Sub

Me.TextBox1 = UCase(Me.TextBox1.Text)

OptionButton1.Value = False
OptionButton2.Value = False
OptionButton3.Value = False
OptionButton4.Value = False
OptionButton5.Value = False
OptionButton6.Value = False

End Sub
--
jb


"Patrick C. Simonds" wrote:

On my UserForm is TextBox1, which if a user makes a change to the TextBox I
want the value of some OptionButtons set to false. That in its self is easy
enough, using the TextBox1_Change routine below. My problem is that during
UserForm Initialization TextBox1 is populated with the following code:

TextBox1.Value = rng(1, 7).Text

Unfortunately the TextBox1_Change routine sees that as a change and sets
all OptionButtons to False. Any suggestions?

Private Sub TextBox1_Change()

Me.TextBox1 = UCase(Me.TextBox1.Text)

OptionButton1.Value = False
OptionButton2.Value = False
OptionButton3.Value = False
OptionButton4.Value = False
OptionButton5.Value = False
OptionButton6.Value = False

End Sub