I have an excel with two columns, one for the relative path of the pdf file and other column with the number page that I want to open.
In one computer, the excel works fine, when I double click in a row, excel calls to foxit reader and open the document.
However I have other computer in which this excel does not work. I get the error 5: invalid procedure call or argument.
How it works in one computer without problems, I think that the problem is in the other computer, not in the VBA code, but I don’t know what it can be the problem.
Which can be the cause of this error?
In both computers I use excel 2007 and I enabled macros when it prompts. In the computer that it works fine, I use windows 7 x64 and in the other computer I have windows 7 x86.
Thanks.
Well, the problem seem to be in the path of the files, in which I need to use double quiotes to solve the problem. In my case I have three string variables:
Then I create a commnad:
Finally I execute the command
With the number page is not needed to use the double quotes.
It’s seems that in some computers it can be possible to have problems with the path of the files, perhaps with the blank spaces, so with the double quotes the problem is solved.
For my experience, this problem does not occur always, in all the computers, but is better to use this solution because is more generic.