Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Works on one computer, but not another

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Works on one computer, but not another

hi Beric

Read the first part on this page
http://www.rondebruin.nl/pdf.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Beric Dondarrion" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Works on one computer, but not another

Cool. Office SP2 fixed it.

Thanks

"Ron de Bruin" wrote:

hi Beric

Read the first part on this page
http://www.rondebruin.nl/pdf.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Beric Dondarrion" wrote in message
...
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


.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default More Problems!

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 he http://groups.google.co.uk/group/mic...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

"Ron de Bruin" wrote:

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
Create Function in SQL Server
http://www.eggheadcafe.com/tutorials...in-sql-se.aspx
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default More Problems!

or an invalid procedure call on SP1!

What do you mean with this ?

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Rhodri Richards" wrote in message ...
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 he
http://groups.google.co.uk/group/mic...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

"Ron de Bruin" wrote:

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
Create Function in SQL Server
http://www.eggheadcafe.com/tutorials...in-sql-se.aspx


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulaed cell response varies from computer to computer WKH Excel Discussion (Misc queries) 3 November 21st 07 06:37 PM
New Computer HPVAL no longer works macgron Excel Worksheet Functions 3 February 12th 07 05:52 PM
How do I open a floppy from a Works file in Excel on new computer Barbie New Users to Excel 1 June 11th 06 05:12 AM
How do I copy all Excel files from old computer to new computer? Rfarsh Excel Discussion (Misc queries) 2 December 20th 05 03:23 AM
Autocomplete works with my home computer but not the office computer Andy Excel Discussion (Misc queries) 4 December 11th 04 07:21 PM


All times are GMT +1. The time now is 07:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"