I have a macro that i recorded on the first tab of my spreadsheet. I need it to function on all the tabs, and it looks likeits hanging up because it specficially only works on the first tabe. Here is the code form the macro. Can you guys pleasehelp me figure out how to make it function on all the tabs of the workbook.
Thanks,
brian
Sub pastImacro()
'
' pastImacro Macro
'
' Keyboard Shortcut: Ctrl+i
'
Range("A3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("Table2").Select
Range("F3").Activate
Application.CutCopyMode = False
ActiveWorkbook.Worksheets("01-Sep-2010").ListObjects("Table2").Sort.SortFields. _
Clear
ActiveWorkbook.Worksheets("01-Sep-2010").ListObjects("Table2").Sort.SortFields. _
Add Key:=Range("Table2[Status]"), SortOn:=xlSortOnValues, Order:= _
xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("01-Sep-2010").ListObjects("Table2").Sort.SortFields. _
Add Key:=Range("Table2[Created On]"), SortOn:=xlSortOnValues, Order:= _
xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("01-Sep-2010").ListObjects("Table2").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("F3").Select
ActiveWindow.SmallScroll Down:=-27
Range("A3:F3").Select
Range("F3").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.249977111117893
.PatternTintAndShade = 0
End With
Range("A4:F4").Select
Range("F4").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.349986266670736
.PatternTintAndShade = 0
End With
Range("A3:F4").Select
Selection.Copy
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Range("A5:F101").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub
Bookmarks