Runtime Error 80070002

NauticalGent

Ignore List Poster Boy
Local time
Today, 13:39
Joined
Apr 27, 2015
Messages
7,024
Buongiorno da Italia!

I am using an VB script as a fe updater. The code works great and updates the fe, installs the icon and transfers all the files. The only thing is isn't doing is launching Access. The code is:

WSHShell.Run cLOCPATH & "\" & cSCNAME & ".lnk"

for the record:
cLOCPATH = C:\PVST_Manager
cSCNAME = Start_PVST Manager

When it gets to this point, I get a 80070002 error and it tells me the file specified cannot be found.

I even tried removing the variables and putting in the literal path; same results. What is really confusing is that if I run the shortcut (Start_PVST Manager.lnk) from the cLOCPATH, it starts Access with no issues.

Any assistance would truly be appreciated!
:banghead:
 
Solved. For some reason, it did not like the spaces in my folder and file names. Who knew?!?
 
I was going to suggest that.

you probably have to put the whole thing inside quote marks when you have an embedded space.
 

Users who are viewing this thread

Back
Top Bottom