T
turnerje
I would like to open a file using excel vba from a network drive. Below
is the code that I have used to find the file. There are three separate
ways below that I have tried, but end up with nothing. The first set of
commands results in an error message of "Invalid Procedure call or
Argument". The second, my computer does not recognize the
FileSystemObject, and the third presents an error message of "Object
variable or With block not set". Any help would be greatly appreciated.
Private Sub CommandButton1_Click()
'ReturnValue = Shell("C:\Program Files\pipc\Procbook\Procbook.exe", 1)
'ReturnValue = Shell("Y:\Dropbox\bosnyak\Drywell Cooler Temperature PI
Trends\803A\T47DT2077.PDI", vbMaximizedFocus)
'Dim fso As FileSystemObject, fil As File
'Set fil = fso.getfile("Y:\Dropbox\bosnyak\Drywell Cooler Temperature
PI Trends\803A\T47DT2077.PDI")
'AppActivate ("PI - ProcessBook")
'Dim appX As PBObjLib.Application
'Set disY = appX.ProcBooks.Open(" Y:\Dropbox\bosnyak\Drywell Cooler
Temperature PI Trends\T47CT7364.PDI", pbPromptConvert)
End Sub
is the code that I have used to find the file. There are three separate
ways below that I have tried, but end up with nothing. The first set of
commands results in an error message of "Invalid Procedure call or
Argument". The second, my computer does not recognize the
FileSystemObject, and the third presents an error message of "Object
variable or With block not set". Any help would be greatly appreciated.
Private Sub CommandButton1_Click()
'ReturnValue = Shell("C:\Program Files\pipc\Procbook\Procbook.exe", 1)
'ReturnValue = Shell("Y:\Dropbox\bosnyak\Drywell Cooler Temperature PI
Trends\803A\T47DT2077.PDI", vbMaximizedFocus)
'Dim fso As FileSystemObject, fil As File
'Set fil = fso.getfile("Y:\Dropbox\bosnyak\Drywell Cooler Temperature
PI Trends\803A\T47DT2077.PDI")
'AppActivate ("PI - ProcessBook")
'Dim appX As PBObjLib.Application
'Set disY = appX.ProcBooks.Open(" Y:\Dropbox\bosnyak\Drywell Cooler
Temperature PI Trends\T47CT7364.PDI", pbPromptConvert)
End Sub