View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Memphis Memphis is offline
external usenet poster
 
Posts: 32
Default value from cbo box and text box

Hello,
So, I have a txtbox1, a combo box, and txt box2
txtbox1 has the user's name, the combo box has "Blank", "YES", and "NO".
I need the cbo box to copy the data from txtbox1 to txtbox2 if the selection
is "YES". I would like for this to happen instantly.
I also want the value to remain blank in txtbox2 if the cbo has no value
("Blank").
My problem comes when I click YES and then it copies the data to txtbox2 and
if I need to change the value to either Blank or NO, the data does
not update until I change the focus to another object.

This does not occurr with a check box, things happen instantly, so why can't
this also happen by selecting a value from a cbobox?

Having said this, a chk box has only two values, this one has 3 values,
perhaps this is where the problem lies.

here is my code..

Thank you for your help.

Private Sub cboNameMatch_Change()
If MatchAllegation_01.cboNameMatch.Value = "YES" Then
MatchAllegation_01.txtUserNameAllegation.Value =
MatchAllegation_01.txtUserName.Value
ElseIf MatchAllegation_01.cboNameMatch.Value = "NO" Or
MatchAllegation_01.cboNameMatch.Value = "" Then
MatchAllegation_01.txtUserNameAllegation.Value = ""
End If
End Sub