im sure the case would work great and probably be alot nicer looking. could you post the code you used so we can see why it didnt work. cause it should work great.
Option Explicit Dim intCounter As Integer Private Sub cmdStart_Click() Dim strName As String strName = txtName.Text intCounter = intCounter + 1 Select Case intCounter Case Is = 1 If txtName.Text = "" Then MsgBox "Please Enter a Name", , "Error" Else lblGreeting.Caption = "Hello there" & strName txtName.Text = "" lblGreeting.Caption = "What do you want to talk about?" End If Case Is = 2 If txtName.Text = "" Then MsgBox "Please Enter Something to talk about", , "Error" Else lblGreeting.Caption = "Well, " & strName & " sounds fun" txtName.Text = "" End If End Select End Sub Private Sub Form_Load() lblGreeting.Caption = "What is your Name?" intCounter = 0 End Sub
i should have waited till you gave me what you had but i really wanted to do it. :oops: but this worked great for me. and i dont think you can initiate a variable in the Option Explicit. you should do it in the form load like i did above