Alright, I spent 4 hours yesterday trying to figure this out until I past out from being so tired. I have tried to do what I am about to explain in EVERY way I can think of or have found, and it's something simple and I use to be able to do it easily but I completely forgot how to do it. It's been 1 year since I have done any programming and it wasn't much back then.
Anyway, all I am trying to do is simply launch a freaking PDF file. I need it to be in the same path in whatever the folder will be on so i'm using "app.path". My suspicion is that I am messing up the "quotes" in my lines of code.
Here is one of the lines of code I have been working with..here is the last one (I have tried it with different quotes and other things like "()" or using "Call"):
VB Code:
Shell app.path & "\book.pdf", vbnormalfocus
I have tried all of them like
VB Code:
Shell app.path & "\book.pdf", 1
VB Code:
Call Shell (app.path & "\book.pdf")
..Ecetera, and it keeps giving me a runtime 5 error, invalid procedure.
I have looked at other threads on here and tried those methods...I get the same error or I just get nothing. I have also tried shellexcute. Anyway, what am I doing wrong?
edit:
is my code showing? it's not for me, I used the vbcode tags.




Reply With Quote