Hola buenas, os keria pedir una ayudita que estoy haciendo un programa en visual basic, le he metido un option(mi idea de meter el boton opcion es que si le pusas una variable se pone a uno y si no le pusas la variable se queda a cero). Es algo sencillo pero no se muy bien que codigo meterle porque le pulso al punto y no me hace nada, solo me deja el punto fijo y la variable no me la cambia.
Sabeis que me puede estar pasando? si alguien tiene alguna idea o algun ejemplo aver si me lo podrias mandar
Option Explicit
Dim variable As Integer
Private Sub Option1_Click()
variable = 1
End SubPrivate Sub Check1_Click()
If Check1.Value = 1 Then
variable = 1
Else
variable = 0
End If
End Sub
Private Sub CmdEnviar_Click()
MSComm1.InBufferCount = 0
If a = 1 Then
TxtEnviar.Text = TxtEnviar.Text + 500
MSComm1.Output = TxtEnviar.Text & Chr$(13)
Else
MSComm1.Output = TxtEnviar.Text & Chr$(13)
End If
Do While MSComm1.OutBufferCount > 0
DoEvents
Loop
End Sub