S
SteveDB1
Hi all.
Back on April 7, 2006 an individual calling themselves
Yardbird(http://www.microsoft.com/communitie...&p=1&tid=c1d2bbac-b1e7-4c93-9775-233243fafda4)
posted on their desire to run a macro in a workbook to cover all the
worksheets in a workbook.
Gary Brown, Tom Ogilvy, and Bob Phillips responded with their resolution.
I'm now trying the code they used, and get a 1004 error. I did replace the
workbook.worksheets with activeworkbook.worksheets.
Dim sh as Worksheet
for each sh in ActiveWorkbook.Worksheets
sh.Select
'code for my macro here....
Next Sh
It appears to get hung up on the 'sh.select', stating that "sh is nothing."
how do I resolve this to get it working?
(my macro code works great without this, and would like to get it to work
for all worksheets in a single stroke. )
Thank you.
Best.
Back on April 7, 2006 an individual calling themselves
Yardbird(http://www.microsoft.com/communitie...&p=1&tid=c1d2bbac-b1e7-4c93-9775-233243fafda4)
posted on their desire to run a macro in a workbook to cover all the
worksheets in a workbook.
Gary Brown, Tom Ogilvy, and Bob Phillips responded with their resolution.
I'm now trying the code they used, and get a 1004 error. I did replace the
workbook.worksheets with activeworkbook.worksheets.
Dim sh as Worksheet
for each sh in ActiveWorkbook.Worksheets
sh.Select
'code for my macro here....
Next Sh
It appears to get hung up on the 'sh.select', stating that "sh is nothing."
how do I resolve this to get it working?
(my macro code works great without this, and would like to get it to work
for all worksheets in a single stroke. )
Thank you.
Best.