Works on one computer, but not another

B

Beric Dondarrion

I'm working on a vba enhanced macro that publishes a pdf to the desktop. I'm
in an office with about 10 computers, all using MSOffice 2007. So far, it
works on 3 of 5 computers.

Here is the sample of code that the debugger flags:

ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:="C:\test\test.pdf"
Openafterpublish:=False

The error message is "Runtime error #5, invalid procedure call or argument"

I just checked and both computers were not updated with the Office SP2. I
haven't tried it since both have been updated.

Also, on the computer that doesn't work, there are little pop-up syntax
helpers while you're typing arguments in the VBA editor, similar to when
you're typing arguments in excel's formula bar. My computer's VBA editor
does not do this. I don't know if they're different versions, or some
obscure option is enabled/disabled on one of them.

Please help! I'm pulling my hair out.

BD
 
R

Rhodri Richards

I have the same problem, but I've just rolled back from SP2 due to my graphs corrupting when they were saved as pdfs (as per the issue here: http://groups.google.co.uk/group/mi...54a03d416fc0e/2fc5f6c06300b210?hl=en&ie=UTF-8 )

It therefore seems that to save to pdf using VBA, I can either have a corrupted file using SP2, or an invalid procedure call on SP1!

Surely there has to be a way round this?

Thanks!



Beric Dondarrion wrote:

Cool. Office SP2 fixed it.Thanks"Ron de Bruin" wrote:
17-Nov-09

Cool. Office SP2 fixed it.

Thanks

:

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
Create Function in SQL Server
http://www.eggheadcafe.com/tutorial...1-d0c5c1eafe94/create-function-in-sql-se.aspx
 

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