Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why I need more then one End If ?
#1
Not Solved
Hello experts, I am new to IT and trying to learn to script but unable to understand why I need EndIf four times in below script at the end for it to work. I have been writing other ElseIf statements and used EndIf only once at end of script and they worked fine but this one is requiring it 4 times. ??

Quote:Dim State, Region
State=Inputbox ("Enter a State")
Region=Inputbox ("Enter a Region")

If state= "AP" Then
If Region= "Telangana" Then
msgbox "Hello Reddy"
msgbox "Dist count is 10"

Else if Region= "Rayalasema" Then
msgbox "Hello GCR"
msgbox "Dist count is 4"

Else If Region= "Costal" Then
msgbox "Hello mohan"
msgbox "Dist count is 9"

End If
End If
End If
End If
Reply


Messages In This Thread
Why I need more then one End If ? - by nidhitaneja - 02-27-2014, 06:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  End Loop wheelercha 2 2,844 12-18-2009, 12:19 AM
Last Post: wheelercha
  How to use Excel sheet in the back end? ttz 1 2,855 09-08-2008, 02:46 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 2 Guest(s)