HELP=What Is Wrong With This Code ?
that does not work either, now fails at the line with the "Ucase"
statement, I get the error when I select my worksheet, the vba code
behind the worksheets calls this piece of code.
the error is a run-time error '57121':
Application-defined or Object-defines error
Public Sub PopulateDropDowns()
Dim WS As Integer
Dim i As Integer
Dim y As Integer
WS = 0
For i = 1 To Sheets.Count
If UCase(Sheets(i).Name) = "PLAYER LIST" Then
Sheets(i).Select
'MsgBox "FOUND PLAYER LIST:" & Sheets(i).Name
WS = i
Exit For
End If
Next i
If WS = 0 Then
MsgBox "Unable to find 'Players List' worksheet"
Exit Sub
Else
== CODE HERE <==
end Sub
|