COMBOBOX + TEXTBOX
Estou com dificuldade de preencher 5 TextBox quando seleciono um item do ComboBox através do comando Case ..alguém poderia me ajudar ?
Private Sub CmbEstacao_Click()
'********************************************************************************************************
Select Case CmbEstacao
Case "1-307"
TextLocal = "Emed Mutun"
TextIP_CV = "???"
TextIP_PLC = "???"
TextIP_PC = "???"
TextQ_MIN = “???”
Case "1-340"
TextLocal = "Emed Gascar"
TextIP_CV = "10.15.25.212/213"
TextIP_PLC = "10.15.25.211"
TextIP_PC = "10.15.25.231"
TextQ_MIN = “???”
Case "1-342"
TextLocal = "Emed Jacutinga"
TextIP_CV = "10.15.25.222/223"
TextIP_PLC = "10.15.25.221"
TextIP_PC = "10.15.25.230"
TextQ_MIN = “???”
End Select
End Sub
Public Sub Form_Load()
'Preenchendo as caixas conforme escolha da Estação
'--------------------------------------------------------
CmbEstacao.AddItem "1-307"
CmbEstacao.AddItem "1-340"
CmbEstacao.AddItem "1-342"
CmbEstacao.AddItem "1-392"
End Sub
Private Sub CmbEstacao_Click()
'********************************************************************************************************
Select Case CmbEstacao
Case "1-307"
TextLocal = "Emed Mutun"
TextIP_CV = "???"
TextIP_PLC = "???"
TextIP_PC = "???"
TextQ_MIN = “???”
Case "1-340"
TextLocal = "Emed Gascar"
TextIP_CV = "10.15.25.212/213"
TextIP_PLC = "10.15.25.211"
TextIP_PC = "10.15.25.231"
TextQ_MIN = “???”
Case "1-342"
TextLocal = "Emed Jacutinga"
TextIP_CV = "10.15.25.222/223"
TextIP_PLC = "10.15.25.221"
TextIP_PC = "10.15.25.230"
TextQ_MIN = “???”
End Select
End Sub
Public Sub Form_Load()
'Preenchendo as caixas conforme escolha da Estação
'--------------------------------------------------------
CmbEstacao.AddItem "1-307"
CmbEstacao.AddItem "1-340"
CmbEstacao.AddItem "1-342"
CmbEstacao.AddItem "1-392"
End Sub
Private Sub CmbEstacao_Change()
'********************************************************************************************************
Select Case CmbEstacao.Text
Case "1-307"
TextLocal.Text = "Emed Mutun"
TextIP_CV.Text = "???"
TextIP_PLC.Text = "???"
TextIP_PC.Text = "???"
TextQ_MIN.Text = "???"
Case "1-340"
TextLocal.Text = "Emed Gascar"
TextIP_CV.Text = "10.15.25.212/213"
TextIP_PLC.Text = "10.15.25.211"
TextIP_PC.Text = "10.15.25.231"
TextQ_MIN.Text = "???"
Case "1-342"
TextLocal.Text = "Emed Jacutinga"
TextIP_CV.Text = "10.15.25.222/223"
TextIP_PLC.Text = "10.15.25.221"
TextIP_PC.Text = "10.15.25.230"
TextQ_MIN.Text = "???"
End Select
End Sub
Public Sub Form_Load()
' Preenchendo as caixas conforme escolha da Estação
' --------------------------------------------------------
CmbEstacao.AddItem "1-307"
CmbEstacao.AddItem "1-340"
CmbEstacao.AddItem "1-342"
CmbEstacao.AddItem "1-392"
End Sub
'********************************************************************************************************
Select Case CmbEstacao.Text
Case "1-307"
TextLocal.Text = "Emed Mutun"
TextIP_CV.Text = "???"
TextIP_PLC.Text = "???"
TextIP_PC.Text = "???"
TextQ_MIN.Text = "???"
Case "1-340"
TextLocal.Text = "Emed Gascar"
TextIP_CV.Text = "10.15.25.212/213"
TextIP_PLC.Text = "10.15.25.211"
TextIP_PC.Text = "10.15.25.231"
TextQ_MIN.Text = "???"
Case "1-342"
TextLocal.Text = "Emed Jacutinga"
TextIP_CV.Text = "10.15.25.222/223"
TextIP_PLC.Text = "10.15.25.221"
TextIP_PC.Text = "10.15.25.230"
TextQ_MIN.Text = "???"
End Select
End Sub
Public Sub Form_Load()
' Preenchendo as caixas conforme escolha da Estação
' --------------------------------------------------------
CmbEstacao.AddItem "1-307"
CmbEstacao.AddItem "1-340"
CmbEstacao.AddItem "1-342"
CmbEstacao.AddItem "1-392"
End Sub
Faça seu login para responder