I am trying to display a filename in my routine but I keep on getting an Runtime error 91
Object Variable or with block variable not set.
Any help would be appreciated
Object Variable or with block variable not set.
Code:
Dim ShName As String
Dim CellRef As Range
ShName = CellRef.Parent.Name
If Range("A" & LR1).Value < Date Then
MsgBox ShName & " will not be saved ", vbOKCancel
Else
wbResults.Close SaveChanges:=True
End If
Any help would be appreciated