I posted this a few days back. Have not yet figured out
how to fix it. Effectively, the routine simply carries
out queries on a spreadsheet and prints results which are
hyperlinks to cell addresses. The list of links can be
quite extensive. In some cases the list goes down to row
65,536. Each type of query is printed in a particular
column.
During the routine, my code seems to periodically
failing. The error is a 1004 Error. However I can't
figure out why this happening. It happens in row 65,532
or 64,420 etc. However it just failed in row 1,111. This
is the line of code it fails on. It fails after the If
statement on the the Errrng line:
If RowCheck(Errrng) = False Then
Errrng.Parent.Hyperlinks.Add Anchor:=Errrng, Address:="", _
SubAddress:=sStr1, _
TextToDisplay:=sStr
'Increment paste range for next comment
Set Errrng = Errrng.Offset(1, 0)
End If
When going to the immediate window I get:
?RowCheck(Errrng) = FALSE
True
?Errrng.Address
$F$1111
?sStr1
'Financing'!W37
?sStr
Financing!W37
Can anyone tell me what is happening here?
Bookmarks