View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default Modify a Macro to Repeat for all Selected Worksheets

I use this macro to help name ranges.

Sub maketable()

Range("B19").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select

ActiveWorkbook.Names.Add Name:=Application.InputBox("Enter Table Name")

End Sub


Is it possible to modify it so that it will run on all selected worksheets
(I select the worksheet via ctrl left click.

Thank you in advance.