Hi All,
I thought I had completed a spreadsheet I've spent months working on when I have started seeing an error when I run a macro
Run-time error '91':
Object variable or With block variable not set
===========
It seems to work correctly when i run it at work, but I dont believe anything has changed.
This is one of the macro codes where I see the error
Sub homethreedart():
ActiveSheet.Unprotect
Dim r As Range, S As String, c As Long
Set r = Range("B34:H34")
S = Range("B1"): c = r.Find(S).Column
Cells(35, c) = 3
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
The : c = r.Find(S).Column being highlighted yellow
Anyone able to shed some light on this please?
Darren
Bookmarks