Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, for the life of me I cannot see why this wont run, all it needs to
do is loop around a number of sheets in a workook and flag up when it finds the correct one, the code fails at the "Instr" line, I have also tried a staright "equals" match, it does not like the object "Worksheets(x).Name": WS = 0 For x = 1 To Worksheets.Count 'MsgBox "SHEET:" & Worksheets.Count If InStr(1, Worksheets(x).Name, "Player List") < 0 Then MsgBox "FOUND PLAYER LIST:" & x WS = x End If Next x If WS = 0 Then MsgBox "Unable to find 'Players List' worksheet" Else CODE GOES HERE thanks.. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What is wrong with this code?!? | Excel Programming | |||
Wrong code? | Excel Programming | |||
What is wrong with this code? | Excel Programming | |||
What's wrong with the code,pls hv a look | Excel Programming | |||
What's wrong with the code,pls hv a look | Excel Programming |