Hi,
I struggle to solve the problem caused by space in path in a shell command. I have read about double quoting but i can not get it working.
So this code works fine without space in path
Private Sub Command0_Click()
Dim sx As String
sx = "P:\HQHA\DB_Directory\CORs\Magic_Jasmine_COR.pdf"
Shell ("C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe " & sx)
End Sub
However when sx string to file contain a space i can not get it worked
Private Sub Command0_Click()
Dim sx As String
sx = "P:\HQHA\DB_Directory\CORs\Magic Jasmine_COR.pdf"
Shell """C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe""" & sx & """"
End Sub
Any advice?
thank you
I struggle to solve the problem caused by space in path in a shell command. I have read about double quoting but i can not get it working.
So this code works fine without space in path
Private Sub Command0_Click()
Dim sx As String
sx = "P:\HQHA\DB_Directory\CORs\Magic_Jasmine_COR.pdf"
Shell ("C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe " & sx)
End Sub
However when sx string to file contain a space i can not get it worked
Private Sub Command0_Click()
Dim sx As String
sx = "P:\HQHA\DB_Directory\CORs\Magic Jasmine_COR.pdf"
Shell """C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe""" & sx & """"
End Sub
Any advice?
thank you