excel vba‎ > ‎

Vba - if .... then elseif

posted Feb 3, 2011, 3:24 PM by Roberto Felicini

Public Sub go_index()

Sheets("home").Select
variable = Range("var").Value
If variable = "2" Then
Sheets("var 2").Select
ElseIf variable = "3" Then
Sheets("var 3").Select
ElseIf variable = "4" Then
Sheets("var 4").Select
End If
Range("A1").Select

End Sub

Comments