nbraybrook
New Member
- Joined
- Aug 3, 2011
- Messages
- 7
I made some macros that ran fine, until they wanted all the macros to be placed on a specific worksheet. I have all my macros now on one worksheet, but the macros do not work now I assume because they are not located on the worksheet they ran on anymore? What code do I add to my macros to tell them to run on sheet1 even if they are on sheet2? Or just code that will let me tell it what worksheet to run on? Thanks in advance!
Code:
Sub ENGREV()
'
' ENGREV Macro
'
'
Rows("5:5").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("C5:U5").Select
With Selection.Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("C6:U6").Select
Range("U6").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("C5").Select
End Sub