ClearArrows - Runtime Error 1004

M

moonhk

How to check worksheet contents of Arrow? if yes, the start to clear
Arrows (Auditing Arrows) ?

loSheet.ClearArrows '~~ <-- If worksheet without Arrows, will case
runtime error 1004.
 
N

NickHK

Using XL2000 & 2002, if I have no arrows showing, calling ClearArrows causes
no error.
Maybe the problem is with the WS reference.

NickHK
 
M

moonhk

Hi NickHK
I am using Excel 2000 SP3.
The WS reference is correct. the part of coding as below.
Just add On Error Resume Next and On Error GoTo 0

On Error Resume Next
loSheet.ClearArrows
On Error GoTo 0
For Each cell In loSheet.Range(site.s1dnAddr & "3:" & site.s1dnAddr
& SubTotal.getMember_cnt + 3)
If cell.Value <> TmpStr Then
Debug.Print "Build_Summary " & cell.Value & " TmpStr=" & TmpStr
& " R1=" & str(R1) & " R2=" & str(R2)
'~~MsgBox cell.Value + " " + TmpStr & "R1=" & Str(R1) & " R2="
& R2
'~~ Build Sum formula
If (R2 > R1) Or (R1 - 1 = R2) Or (R1 = R2) Then

If R1 - 1 = R2 Then
R2 = R1
End If
 
P

Peter T

Does this error for you, it doesn't for me

Sub test()
Dim ws As Worksheet
Set ws = ActiveWorkbook.Worksheets.Add
ws.ClearArrows

End Sub

Regards,
Peter T
 
N

NickHK

Peter,
I can't get .ClearArrows to error at all.
That's why I was surprised with the OP's problem.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top