I am sure this is just the dumbest thing I am overlooking, but does anyone have any insight as to why this first one works and the second brings back a error 91 Object variable or with block variable not set. Both my variables or 'Set' are declared as Ranges - hence having a .Row and a .Column in the MsgBox
Code:
Application.FindFormat.Clear
Application.FindFormat.Interior.Color = RGB(216, 219, 216)
Set zRGB216 = ActiveSheet.Columns("A:AA").Find(What:="*", LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False, MatchByte:=False, _
SearchFormat:=True)
MsgBox (zRGB216.Row)
Code:
Application.FindFormat.Clear
Application.FindFormat.Borders(xlEdgeRight).Weight = xlMedium
Set xlBorder = ActiveSheet.Columns("A:AA").Find(What:="*", LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious, MatchCase:=False, MatchByte:=False, SearchFormat:=True)
MsgBox (xlBorder.Columns)