> I am still waiting for someone to help me solve this problem!!!
> Paul
OK, I'm at a loss, but out of desperation I'll suggest what I always do when
I have an untrappable error
Comment out all your error-handling code, see if the error still occurs. If
it does, note which line the program breaks on (will be highlighted in
yellow when execution halts due to the error).

Signature
Ed Bennett - MVP Microsoft Publisher
zackb - 26 Apr 2005 19:01 GMT
What is it exactly that you are referring to? Apparently Ed knows that code
to which you refer, but I cannot find it. In another newsgroup perhaps??
Anyway, error handling is a serious issue and should be dealt with very
carefully. You need to know what will cause an error and where. If you
don't know, set up some watches and then step through your code (VBE | F8).
Try to stay away from On Error Resume Next statements, as they can be
hazardous; sometimes they are a necessity though. You can re-route errors
with the On Error Goto errHandler type statements (with a matching
"errHandler:" line statement where the redirect will take the code).
Another way to check for errors is to (coupled with an error aversion) check
for the Err property ...
If Err Then 'or If Err <> 0 Then
'your error handling code here
Msgbox "You have an error!" & vbcrlf & vbcrlf & _
"Error: " & Err.number & vbcrlf & _
"Description: " & Err.description
Else
'no error here!
Msgbox "No errors!"
End If
Many ways exist to handle errors; most (imho) vary dependent upon the
structure and purpose of your code. Each must be handled in their own
unique way.
HTH, and regards,
Zack Barresse
>> I am still waiting for someone to help me solve this problem!!!
>> Paul
[quoted text clipped - 5 lines]
> If it does, note which line the program breaks on (will be highlighted in
> yellow when execution halts due to the error).
zackb - 26 Apr 2005 19:06 GMT
Hello Paul,
Sorry, did not see your code. (Doh!) How about something like this ..
Set page02 = oApp.ActiveDocument.Pages.Add 1, 2
Does that help?
Regards,
Zack Barresse
>> I am still waiting for someone to help me solve this problem!!!
>> Paul
[quoted text clipped - 5 lines]
> If it does, note which line the program breaks on (will be highlighted in
> yellow when execution halts due to the error).
Ed Bennett - 26 Apr 2005 20:00 GMT
zackb <zackb@portofmorrow.com> was very recently heard to utter:
> Hello Paul,
>
> Sorry, did not see your code. (Doh!) How about something like this
> ..
> Set page02 = oApp.ActiveDocument.Pages.Add 1, 2
In VBA, if the method comes after the = sign, then the arguments have to be
enclosed in brackets.
i.e. Set page02 = oApp.ActiveDocument.Pages.Add(1, 2)

Signature
Ed Bennett - MVP Microsoft Publisher
zackb - 26 Apr 2005 20:03 GMT
Yes, I forget that when I write shorthand vba.. uh, oops. LOL!
Thanks Ed, appreciate the clarification.
-Zack Barresse
> zackb <zackb@portofmorrow.com> was very recently heard to utter:
>> Hello Paul,
[quoted text clipped - 7 lines]
>
> i.e. Set page02 = oApp.ActiveDocument.Pages.Add(1, 2)
Ed Bennett - 26 Apr 2005 21:29 GMT
zackb <zackb@portofmorrow.com> was very recently heard to utter:
> Yes, I forget that when I write shorthand vba.. uh, oops. LOL!
>
> Thanks Ed, appreciate the clarification.
No problem :-)

Signature
Ed Bennett - MVP Microsoft Publisher