Thread: Help with code
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Help with code


For Each sh In Activeworkbook.Worksheets
If sh.Range("B1").Value = "" Then
sh.Select
Exit For
End If
Next sh

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Greg B" wrote in message
...
Hi all,
I would like some help with getting a code to scroll through the sheet in

my
workbook and when it comes up to the first one with nothing in cell b1 to
select that page. I know the long way but there has got to be a better

way
than having 150 ifs in a code

Thanks

Greg