Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
minrufeng
 
Posts: n/a
Default automatically apply a macro to all worksheets


for example, i create a simple macro for inserting a row above a certain
cell. I want the macro applied to all sheets when running the macro.
Does anyone know how to do this? thanks a lot!


--
minrufeng
------------------------------------------------------------------------
minrufeng's Profile: http://www.excelforum.com/member.php...o&userid=26208
View this thread: http://www.excelforum.com/showthread...hreadid=515021

  #3   Report Post  
Posted to microsoft.public.excel.misc
David McRitchie
 
Posts: n/a
Default automatically apply a macro to all worksheets

see
http://www.mvps.org/dmcritchie/excel...htm#loopsheets
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"minrufeng" wrote in message
...

for example, i create a simple macro for inserting a row above a certain
cell. I want the macro applied to all sheets when running the macro.
Does anyone know how to do this? thanks a lot!


--
minrufeng
------------------------------------------------------------------------
minrufeng's Profile: http://www.excelforum.com/member.php...o&userid=26208
View this thread: http://www.excelforum.com/showthread...hreadid=515021



  #4   Report Post  
Posted to microsoft.public.excel.misc
minrufeng
 
Posts: n/a
Default automatically apply a macro to all worksheets


However, if I misoperate a macro to all worksheets and want to undo this
operation, what should I do? Thanks for your great help!


--
minrufeng
------------------------------------------------------------------------
minrufeng's Profile: http://www.excelforum.com/member.php...o&userid=26208
View this thread: http://www.excelforum.com/showthread...hreadid=515021

  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default automatically apply a macro to all worksheets

Save your workbook before you run this macro.

If you screw it up, then close that workbook without saving and reopen it.

minrufeng wrote:

However, if I misoperate a macro to all worksheets and want to undo this
operation, what should I do? Thanks for your great help!

--
minrufeng
------------------------------------------------------------------------
minrufeng's Profile: http://www.excelforum.com/member.php...o&userid=26208
View this thread: http://www.excelforum.com/showthread...hreadid=515021


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default automatically apply a macro to all worksheets

try.
Sub insertrowinallsheets()
myrow = ActiveCell.Row
For Each ws In Worksheets
ws.Rows(myrow).DELETE
Next
End Sub


--
Don Guillett
SalesAid Software

"minrufeng" wrote
in message ...

However, if I misoperate a macro to all worksheets and want to undo this
operation, what should I do? Thanks for your great help!


--
minrufeng
------------------------------------------------------------------------
minrufeng's Profile:
http://www.excelforum.com/member.php...o&userid=26208
View this thread: http://www.excelforum.com/showthread...hreadid=515021



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
Run macro automatically on opening of worksheet bnkone Excel Worksheet Functions 1 February 13th 06 09:46 PM
How do I automatically copy columns to/from Excel worksheets? Paul Excel Discussion (Misc queries) 2 December 28th 05 08:41 PM
Master worksheet automatically enters data into sub worksheets Ken Excel Discussion (Misc queries) 1 November 1st 05 10:36 PM
make custom header and footer in excel apply to all worksheets Alexandra Excel Discussion (Misc queries) 1 May 27th 05 06:11 PM
Execute Macro automatically after hyperlink Bill Elerding Excel Discussion (Misc queries) 13 May 5th 05 01:01 AM


All times are GMT +1. The time now is 05:17 PM.

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

About Us

"It's about Microsoft Excel"