Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Este Programa está dando erro de sintax nas linhas em Vermelho alguém sabe porque ( tirei de um livro visual basic 6.0 passo a passo)
I
Option Explicit
Private Sub form_Load()
Label1.Caption = "Enter Name:"
Text1.Text = ""
Command1.Caption = "Process Selection"
End Sub
Private Sub Command1_Click()
Dim choice As Integer
Dim entry As String
entry = Text1.Text
choice = Val(entry)
If choice = 1 Then
MsgBox "You chose red."
Form1.BackColor = vbRed
Elself choice = 2 Then
MsgBox "You chose green."
Form1.BackColor = vbGreen
Elself choice = 3 Then
MsgBox "You chose Blue."
Form1.BackColor = vbBlue
Else
MsgBox "Invalid selection."
End If
End Sub
Este Programa está dando erro de sintax nas linhas em Vermelho II
Option Explicit
Private Sub Form_Load()
Label1.Caption = "Enter Name:"
Text1.Text = ""
Command1.Caption = "Process Selection"
End Sub
Private Sub Command1_Click()
Dim name As String
name = Text1.Text
name = UCase(name)
If name = "Fred" Then
MsgBox "Hi,Fred!"
Elself name = "SARAH"
MsgBox "How's it going, Sarah?"
Elself name = "TONY"
MsgBox "Hey! It's my man Tony!"
Else
MsgBox "Hello,Stranger."
End If
End Sub
Carregando comentários...