Can someone help Cleanup my recorded macro

K

Kelly********

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top