Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Apply Macro on Multiple Worksheets in a Workbook


Hi Norman,

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

Any other ideas?

Thanks a million

--
Agne
-----------------------------------------------------------------------
Agnes's Profile: http://www.excelforum.com/member.php...fo&userid=1463
View this thread: http://www.excelforum.com/showthread.php?threadid=26261

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to apply macro across multiple worksheets within a workbook murkaboris Excel Discussion (Misc queries) 4 April 9th 09 01:24 AM
Combine worksheets in multiple workbook in one workbook with a macro Sam Commar Excel Discussion (Misc queries) 2 April 2nd 09 01:09 PM
Apply Macro to all worksheets in a workbook except one Carrie_Loos via OfficeKB.com Excel Discussion (Misc queries) 5 January 15th 09 10:03 PM
Excel should apply names in all worksheets of a workbook Softball Pete Excel Discussion (Misc queries) 1 January 23rd 06 02:42 PM
Apply Macro on Multiple Worksheets in a Workbook Agnes Excel Programming 1 September 22nd 04 11:42 PM


All times are GMT +1. The time now is 04:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"