View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Apply Macro on Multiple Worksheets in a Workbook

Hi Agnes,

To demonstrate that my code operates sequentially on each worksheet, run
this minor adaptation:

Sub Tester()
Dim sh As Worksheet

For Each sh In ActiveWorkbook.Worksheets
MsgBox sh.name
Next sh

End Sub

You may need to adapt your format code to replace activesheet or sheet names
with the variable sh.

If this is a problem, post your code and I will adjust it in this respect.
---
Regards,
Norman



"Agnes" wrote in message
...

Hi Norman,

Thanks for helping! It's a great start, but unfortunately the code
runs in a loop in the selected worksheet and won't apply the formatting
code to the next worksheet.

Any other ideas?

Thanks a million!


--
Agnes
------------------------------------------------------------------------
Agnes's Profile:
http://www.excelforum.com/member.php...o&userid=14630
View this thread: http://www.excelforum.com/showthread...hreadid=262619