Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I have the following code which is not currently working, I was wondering if someone could spot the (probably obvious) error? What I have is a list of worksheet names in cells range E3:H6. I want the macro to step through these and perform actions in each worksheet. I also want it to check if the worksheet actually exists before performing any actions. At the moment the macro halts at the Sheets(myCell).Select part where I'm trying to refer to the worksheet name. Any help would be much appreciated! Marc Sub Macro3() For Each myCell In Range("E3:H6") If myCell.Value < "" Then Sheets(myCell).Select .....rest of working code goes here..... End If Next myCell End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Looping through worksheets | Excel Programming | |||
Looping Thru Worksheets | Excel Programming | |||
Looping through Worksheets | Excel Programming | |||
looping through worksheets | Excel Programming | |||
looping through worksheets | Excel Programming |