Here's an example, but Visual basic gives me an error when trying to run it. Say I wanted to ask the user for their name, then display it like: "Hello there" strName
By the way, my CDs finally came Friday, so I have VB .NET, but this was done in VB6.
Private Sub cmdStart_Click()
Dim strName As String
strName = txtName.Text
If txtName.Text = "" Then
MsgBox "Please Enter a Name",,"Error"
Else
lblGreeting.Caption = "Hello there" strName
txtName.Text = ""
End If
End Sub