Pat_The_Bat
Board Regular
- Joined
- Jul 12, 2018
- Messages
- 83
I don't understand why I can't resize the selection!!! I figured since HDR2 is a range variable I would be able to just reference the variable object, select it and resize it. I would have thought it would just be
HDR2.resize(0,-2).select
But I keep getting "Application-defined or object-defined error"
any help is greatly appreciated.
HDR2.resize(0,-2).select
But I keep getting "Application-defined or object-defined error"
any help is greatly appreciated.
Code:
Sheets("Doc List").Activate
With Sheets("Doc List")
Set HDRAK2 = Range("AK:AK").Find("ASSET")
Debug.Print HDRAK2.Address
Set HDR2 = HDRAK2.Offset(, -31)
Debug.Print HDR2.Address
End With
HDR2.Select
HDR2.Resize(0, 2).Select
Sheets("Doc List").Range("F7").Resize(0, -1).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorLight2
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0
End With