Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 116
Default How to apply macros to entire workbook

I would like to know how to apply a macro to an entire workbook. I created a
macro within a worksheet. I would like to apply it to every sheet without
having to go each sheet and run the macro. Is there an easy way of doing
this? I am not a programmer...

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How to apply macros to entire workbook

Post your code.

A macro usually in placed into a General Module.

Event code will be placed in a worksheet or Thisworkbook module.

Do you mean you want a macro like this which works on all sheets in the workbook
when you run it once?

Sub Path_All_Sheets()
Set wkbktodo = ActiveWorkbook
For Each ws In wkbktodo.Worksheets
ws.PageSetup.RightFooter = ActiveWorkbook.FullName & " " & Chr(13) _
& Application.UserName & " " & Date
Next
End Sub


Gord Dibben MS Excel MVP

On Tue, 15 Jan 2008 20:03:00 -0800, Sherry
wrote:

I would like to know how to apply a macro to an entire workbook. I created a
macro within a worksheet. I would like to apply it to every sheet without
having to go each sheet and run the macro. Is there an easy way of doing
this? I am not a programmer...

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default How to apply macros to entire workbook

hi
if it's a sheet macro..no. the code has to be in a standard module or a this
workbook module for you to apply it to the entire work book.
post your code.

Regards
FSt1

"Sherry" wrote:

I would like to know how to apply a macro to an entire workbook. I created a
macro within a worksheet. I would like to apply it to every sheet without
having to go each sheet and run the macro. Is there an easy way of doing
this? I am not a programmer...

Thanks!

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 do I apply formula to entire column Stephan Excel Discussion (Misc queries) 2 October 1st 06 06:04 PM
HOW DO I APPLY A FORMULA FOR AND ENTIRE ROW? jcpayne Excel Worksheet Functions 2 July 19th 06 06:02 PM
How to apply a format to an entire workbook mdeanda Excel Worksheet Functions 0 May 17th 05 06:17 PM
How to apply a format to an entire workbook Peo Sjoblom Excel Worksheet Functions 0 May 17th 05 06:11 PM
I would like to apply the same calculation to an entire row mnirula Excel Worksheet Functions 3 April 25th 05 10:05 PM


All times are GMT +1. The time now is 05:06 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"