You are not logged in.
Hi all,
Im creating a VBA script which is running a shell on cmd "UNC path" but it still comming back with "The network path was not found.
The system cannot find the path specified." If I copy and paste the address directly in the CMD prompt it works???
this is the code:
Private Sub Command21_Click()
cmd = "cmd /k "
file = "\\Thos99data.nl.pntpost.com\occ&sqa$\OPS_Processes\Reports\CI label\test.imr"
' below is the NON UNC path
'file = "m:\OPS_Processes\Reports\CI label\test.imr"
filestring = Chr(34) & file & Chr(34)
Path = cmd + filestring
MsgBox Path
Call Shell(Path)
Please help Im really stuck with this one.
Offline
I think the problem may be this in the pathname:
occ&sqa$
try either renaming that share or escaping the & as ^& in the variable
occ^&sqa$
Offline