In a userform i have several comboboxs, some are hide...
I want a code who show a combo call "txt_dupla" when value of range "(S22")=1
I use those codes in the userform, dont seems working.. combo dont show.
the value of Sheets("Dados").Range("S22") change with the input of combo "txt_tipo".
Thanks for the help
I want a code who show a combo call "txt_dupla" when value of range "(S22")=1
I use those codes in the userform, dont seems working.. combo dont show.
Code:
Private Sub UserForm_Initialize()
Me.txt_nivel.RowSource = "Dados!x3:x4"
Me.txt_curso.RowSource = "Dados!w3:w4"
Me.txt_tipo.RowSource = "Dados!y3:y4"
Me.txt_dupla.RowSource = "Dados!y10:y20"
txt_dupla.Visible = False
end sub
Code:
Private Sub bt_gravar_Click()
Dim r As Long
Application.Visible = False
Sheets("Dados").Activate
desprotege
Range("r19").Select
ActiveCell.Offset(1, 0) = txt_curso.Value
ActiveCell.Offset(2, 0) = txt_nivel.Value
ActiveCell.Offset(3, 0) = txt_tipo.Value
ActiveCell.Offset(4, 0) = txt_design.Value
r = Sheets("Dados").Range("S22").Value
If r = 1 Then
txt_dupla.Visible = True
Label7.Visible = True
ActiveCell.Offset(5, 0) = txt_dupla.Value
End If
protege
Unload Me
Menu.Show
End Sub
the value of Sheets("Dados").Range("S22") change with the input of combo "txt_tipo".
Thanks for the help