I have a working VBA program that I decided to clean up.
I rearranged some Subs and Functions and got an error.
Error 91 Object variable or With block variable not set.
The error is on the fr Range variable in a Sub farther down in the code
After much trial and error I discovered that I could eliminate the problem by adding a dummy sub at the start of the code
code looks like ...
Sub dummy()
' code will not work without this dummy routine
' don't know why
End Sub
Dim fr As Range
Sub getNewBadChecks() ...
If I comment out the dummy Sub I get the error.
Every seen anything like this ? What's the fix?
Bookmarks