Not quite sure why:
Code:
x = Shell("C:\Program Files\Snapshot Viewer\SNAPVIEW.exe " & strFile, 1)
doesn't work, unless "h:\Snapshots\TempSnap.snp" can't be found or accessed. It works fine on my end.
You do want to specify the path as you have, or Shell just looks for the exe along paths specified by the PATH Environment Variable in your system settings, which include (by default) %SystemRoot%\system32 (typically C:\WINDOWS\SYSTEM32) and %SystemRoot% (typically C:\WINDOWS).
Try:
Code:
Public Sub OpenSnapShotViewer()
Dim x As Variant
Dim Path As String
Dim File As String
Path = "C:\Program Files\Snapshot Viewer\SNAPVIEW.EXE"
File = "h:\Snapshots\TempSnap.snp"
x = Shell(Path + " " + File, vbNormalFocus)
End Sub
in case ther is a typo or something involved somewhere. I had no problem with:
Code:
Public Sub OpenSnapShotViewer()
Dim x As Variant
Dim Path As String
Dim File As String
Path = "C:\Program Files\Snapshot Viewer\SNAPVIEW.EXE"
File = "E:\SecuredDatabase.snp"
x = Shell(Path + " " + File, vbNormalFocus)
End Sub
Bob