View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default Repeating a Macro For Each Selected Worksheet

I have this macro:

Sub temp()

Range("B19").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveWorkbook.Names.Add Name:="NameOfWorksheetHere", RefersToR1C1:= _
"='throttling 01102005'!R19C2:R115C6"
End Sub

Is it possible to run this macro on all worksheets in the workbook and have
the name of the worksheet inserted into the "NameOfWorksheetHere" ?

Thank you in advance.