Neopa & ChipR :
4- I choose the lower case.
When I put my 5th line as Else statement without End If, it shows a compile error [Else without If], when I put ElseIf, it shows syntax error (without any other clarification) and shows [ElseIf] statement with red line.
Neopa : your code in participation #14 didn't work!! , I still click on the search button without any response or even error message.
I wrote this code and shows to me (after entered the name) : [ Wrong name] which means it didn't make any comparison, what I should add?
Neopa: I think I have a compilation problem (based on your explanation) because after I checked (Require variable compilation), nothing changed and [Option Explicit] didn't show in the code.
-Every time I post or take any code, I compile and run it before write or do anything.
Thanks guys.
4- I choose the lower case.
When I put my 5th line as Else statement without End If, it shows a compile error [Else without If], when I put ElseIf, it shows syntax error (without any other clarification) and shows [ElseIf] statement with red line.
Neopa : your code in participation #14 didn't work!! , I still click on the search button without any response or even error message.
I wrote this code and shows to me (after entered the name) : [ Wrong name] which means it didn't make any comparison, what I should add?
Code:
Private Sub searchButton_Click()
Dim Inn As String
Inn = InputBox("Would you enter the Employee's First Name?")
If Inn = txtFirstName Then MsgBox ("OK")
If Inn <> txtFirstName Then MsgBox ("Wrong Name")
End Sub
-Every time I post or take any code, I compile and run it before write or do anything.
Thanks guys.
Comment