Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default macro to all worksheets

hi
how to apply a single macro to all worksheets????????
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,058
Default macro to all worksheets

Sub allsheets()
Dim w As Worksheet
For Each w In Worksheets
w.Range("A1").Value = 1
Next
End Sub
is an example of doing something on all the worksheets in a workbook.
--
Gary''s Student - gsnu2007d


" wrote:

hi
how to apply a single macro to all worksheets????????

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default macro to all worksheets

Sub allshts()
For Each ws In ActiveWorkbook.Sheets
MsgBox ws.Name
Next ws
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

wrote in message
...
hi
how to apply a single macro to all worksheets????????


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
Using a macro that includes 2 worksheets Richard Champlin Excel Discussion (Misc queries) 3 August 24th 07 10:51 PM
Run Macro for all worksheets saman110 via OfficeKB.com Excel Worksheet Functions 2 July 23rd 07 10:27 PM
Run a macro on multiple worksheets? J@Y Excel Discussion (Misc queries) 3 February 3rd 07 10:24 AM
MACRO AND MULTIPLE WORKSHEETS Mel Excel Worksheet Functions 8 January 21st 07 02:53 PM
Same macro - Different Worksheets!? PaulW Excel Discussion (Misc queries) 2 December 12th 06 11:55 AM


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