Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Can someone help Cleanup my recorded macro
I was wondering if some one could look at this and clean it up so its more
better. I dont know excel very good I recorded the macro and if the excel file changes in pretty much any way then the macro error. Application.Run "'Points Tracker.xls'!UnprotectAll" Columns("H:AK").Select Selection.EntireColumn.Hidden = True Range("A4:AM104").Select Range("AM4").Activate Selection.Sort Key1:=Range("AM4"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("A4").Select With ActiveWorkbook.PublishObjects("Nitro Points Tracker_23684") .HtmlType = xlHtmlStatic .Publish (False) .AutoRepublish = False End With Range("A4:AM104").Select Selection.Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("A4").Select Selection.EntireColumn.Hidden = False Cells.Select Selection.EntireColumn.Hidden = False Range("A4").Select Sheets("eigth_sportsman").Select Columns("H:AK").Select Selection.EntireColumn.Hidden = True Range("A4:AM104").Select Range("AM4").Activate Selection.Sort Key1:=Range("AM4"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("A4").Select With ActiveWorkbook.PublishObjects("Points Tracker_29286") .HtmlType = xlHtmlStatic .Publish (False) .AutoRepublish = False End With Range("A4:AM104").Select Selection.Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Cells.Select Selection.EntireColumn.Hidden = False Range("A4").Select Sheets("arena_truck").Select Columns("H:AK").Select Selection.EntireColumn.Hidden = True Range("A4:AM104").Select Range("AM4").Activate Selection.Sort Key1:=Range("AM4"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("A4").Select With ActiveWorkbook.PublishObjects("Points Tracker_30097") .HtmlType = xlHtmlStatic .Publish (False) .AutoRepublish = False End With Range("A4:AM104").Select Selection.Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Cells.Select Selection.EntireColumn.Hidden = False Range("A4").Select Sheets("monster_truck").Select Columns("H:AK").Select Selection.EntireColumn.Hidden = True Range("A4:AM104").Select Range("AM4").Activate Selection.Sort Key1:=Range("AM4"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("A4").Select With ActiveWorkbook.PublishObjects("Points Tracker_30829") .HtmlType = xlHtmlStatic .Publish (False) .AutoRepublish = False End With Range("A4:AM104").Select Selection.Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Cells.Select Selection.EntireColumn.Hidden = False Range("A4").Select Sheets("stadium_truck").Select Columns("H:AK").Select Selection.EntireColumn.Hidden = True Range("A4:AM104").Select Range("AM4").Activate Selection.Sort Key1:=Range("AM4"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("A4").Select With ActiveWorkbook.PublishObjects("Points Tracker_31534") .HtmlType = xlHtmlStatic .Publish (False) .AutoRepublish = False End With Range("A4:AM104").Select Selection.Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Cells.Select Selection.EntireColumn.Hidden = False Range("A4").Select Sheets("eigth_scale").Select Range("A4").Select Application.Run "'Points Tracker.xls'!ProtectAll" ActiveWorkbook.Save |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Repeat a recorded macro | Excel Discussion (Misc queries) | |||
How to FIX Recorded Macro | Excel Discussion (Misc queries) | |||
Recorded Macro | New Users to Excel | |||
I recorded a macro, how can i share it with others? | Excel Worksheet Functions | |||
Recorded macro: What happens if I change filename? | Excel Discussion (Misc queries) |