Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi -- I have a macro I recorded that's doing some formatting on a report.
One part of the macro is looking at the name of the worksheet, but it's not always the same name. Is there any way to alter this code so it works no matter what the worksheet name is? It really just needs to select a particular column, I'm not sure why it's looking at the worksheet name at all. Thanks for any advice! -Dawn ActiveWorkbook.Worksheets("Docket_Report 1 ").Sort.SortFields.Clear ActiveWorkbook.Worksheets("Docket_Report 1 ").Sort.SortFields.Add _ Key:=Range("H2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _ :=xlSortTextAsNumbers With ActiveWorkbook.Worksheets("Docket_Report 1 ").Sort .SetRange Range("A3:I45") .Header = xlNo .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Choosing which macro to call | Excel Programming | |||
Choosing printer in a printing macro | Excel Programming | |||
Choosing printer in a printing macro | Excel Programming | |||
Help on choosing the right way | Excel Programming | |||
choosing from a list in VB | Excel Programming |