PC Review


Reply
Thread Tools Rate Thread

ClearArrows - Runtime Error 1004

 
 
moonhk
Guest
Posts: n/a
 
      12th Dec 2006
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.

 
Reply With Quote
 
 
 
 
NickHK
Guest
Posts: n/a
 
      12th Dec 2006
Using XL2000 & 2002, if I have no arrows showing, calling ClearArrows causes
no error.
Maybe the problem is with the WS reference.

NickHK

"moonhk" <moon_ils-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
moonhk
Guest
Posts: n/a
 
      12th Dec 2006
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

NickHK wrote:
> Using XL2000 & 2002, if I have no arrows showing, calling ClearArrows causes
> no error.
> Maybe the problem is with the WS reference.
>
> NickHK
>
> "moonhk" <moon_ils-(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.
> >


 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      12th Dec 2006
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

"moonhk" <moon_ils-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> NickHK wrote:
> > Using XL2000 & 2002, if I have no arrows showing, calling ClearArrows

causes
> > no error.
> > Maybe the problem is with the WS reference.
> >
> > NickHK
> >
> > "moonhk" <moon_ils-(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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.
> > >

>



 
Reply With Quote
 
NickHK
Guest
Posts: n/a
 
      12th Dec 2006
Peter,
I can't get .ClearArrows to error at all.
That's why I was surprised with the OP's problem.

NickHK

"Peter T" <peter_t@discussions> wrote in message
news:(E-Mail Removed)...
> 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
>
> "moonhk" <moon_ils-(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> > NickHK wrote:
> > > Using XL2000 & 2002, if I have no arrows showing, calling ClearArrows

> causes
> > > no error.
> > > Maybe the problem is with the WS reference.
> > >
> > > NickHK
> > >
> > > "moonhk" <moon_ils-(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > 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.
> > > >

> >

>
>



 
Reply With Quote
 
moonhk
Guest
Posts: n/a
 
      13th Dec 2006
Hi Both
Today, rerun the coding. no error found.

NickHK wrote:
> Peter,
> I can't get .ClearArrows to error at all.
> That's why I was surprised with the OP's problem.
>
> NickHK
>
> "Peter T" <peter_t@discussions> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> > "moonhk" <moon_ils-(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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
> > >
> > > NickHK wrote:
> > > > Using XL2000 & 2002, if I have no arrows showing, calling ClearArrows

> > causes
> > > > no error.
> > > > Maybe the problem is with the WS reference.
> > > >
> > > > NickHK
> > > >
> > > > "moonhk" <moon_ils-(E-Mail Removed)> wrote in message
> > > > news:(E-Mail Removed)...
> > > > > 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.
> > > > >
> > >

> >
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime error 1004 after 1st run Arkansas Lady Microsoft Access VBA Modules 4 24th Sep 2008 04:04 PM
Runtime error 1004 leejen87@gmail.com Microsoft Excel Programming 2 4th Apr 2007 08:02 PM
1004 runtime error =?Utf-8?B?V2FsZHlk?= Microsoft Excel Programming 1 18th Jul 2006 06:54 PM
runtime error 1004 JC Microsoft Excel Programming 3 4th Nov 2005 12:50 PM
Another runtime 1004 error Paulbill1@gmail.com Microsoft Excel Misc 2 17th Sep 2005 09:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:39 PM.