Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
This should do the trick. - John Michl
Sub maketable() Set SheetList = ActiveWindow.SelectedSheets For Each sh In SheetList sh.Activate Range("B19").Select Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlToRight)).Select ActiveWorkbook.Names.Add Name:=Application.InputBox("Enter Table Name") Next sh End Sub |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Forgot to mention that in the future, post macro questions in the
"programming" group since that's where the VBA pros hang out. - John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Page Setup for multiple worksheets macro problem | Excel Discussion (Misc queries) | |||
Macro Help In Excel | Excel Discussion (Misc queries) | |||
Macro to repeat formulas in next row | Excel Discussion (Misc queries) | |||
How to program an excel macro to repeat a series of keystrokes? | Excel Discussion (Misc queries) | |||
Macro with Range of Worksheets | New Users to Excel |