0

チェックボックスがチェックされていない場合、テキストボックス内のテキストが変更されないのはなぜですか? チェックされていない場合、テキストボックスのテキストには「-g no」が含まれているはずですが、Command1 がクリックされても変更されません。解決策はありますか?おそらく非常に簡単なことですが、私はこれで成功していません。:\

私のコード:

Private Sub Command1_Click()
    If Check1.Enabled = True Then
        If TextPass.Text = "" Then
            Text1.Text = "-o " & TextPool.Text & ":" & TextPort.Text & " -u " & TextUser.Text & " -g yes " & "-t " & Combo1.ListIndex
        Else
            Text1.Text = "-o " & TextPool.Text & ":" & TextPort.Text & " -u " & TextUser.Text & " -p " & TextPass.Text & " -g yes " & "-t " & Combo1.ListIndex
        End If
    Else
        If TextPass.Text = "" Then
            Text1.Text = "-o " & TextPool.Text & ":" & TextPort.Text & " -u " & TextUser.Text & " -g no " & "-t " & Combo1.ListIndex
        Else
            Text1.Text = "-o " & TextPool.Text & ":" & TextPort.Text & " -u " & TextUser.Text & " -p " & TextPass.Text & " -g no " & "-t " & Combo1.ListIndex
        End If
    End If
End Sub

助けていただければ幸いです。または、コードを修正するだけです。

4

2 に答える 2