Create Pdf files problem

character

New member
Joined
Jul 27, 2012
Messages
3
Reaction score
0
Points
0
Dear All,

I have tried the Ken Puls Macro for printing to PDF file using PDFCreator, but I have come up with a strange situation:
when running the code from inside the macro using F8, everything works fine, but when running the macro thru F5 or from macros option the code stops because of error. I don't believe there is a problem with the code, but rather something else.

any hints?

Regards
 

Attachments

  • test.xlsm
    37.3 KB · Views: 25
If you could post the error you are getting , that would be a big help
 
the error is:

Run-time error 429
ActiveX component cann't create object

But why do you think this error happens only when running the code from beginning to end using F5 and not line by line?

10x
 
it could be that when you use F8 to step through the code a process in the code has time to run and finish. When you try to run run the macro a process in the code is not finishing before new code is trying to run. google this problem and you will see others have run into the same issue.
 
I have google it before, but haven't found a way to fix it :( I have added
line code, but the error just moves down...any hints?
 
I personally would drop back and and adjust the code to see if i could get it to print 1 sheet without errors. once i had that working i would move on to trying then to get the code to print muliple sheets.
 
I was having a similar problem. My error was "ActiveX can't find object" I had to move the dll I was using to the excel startup directory. The key is in the error message.

I suggest that you use breakpoints to find out exactly where the code is failing and then work backwards from there.


I have excel 2003, so I can't open your file.
 
Back
Top