Hi
I've having trouble with the VBA shell command. I can use the basic command to launch a file directly from VBA and obtain the task ID.
E.g., ProgID=Shell("C:\addressofprogram.exe ""C:\addressoffiletobeopened.doc"""), vbNormalFocus
I'm sure this is simple. However, I can't work out how to input the program and file address into the shell command if I already have them as variables in my code.
E.g., This doesn't work: ProgID =Shell(ProgAddress & FileAddress), vbNormalFocus
Please can someone help.
Many thanks in advance.
I've having trouble with the VBA shell command. I can use the basic command to launch a file directly from VBA and obtain the task ID.
E.g., ProgID=Shell("C:\addressofprogram.exe ""C:\addressoffiletobeopened.doc"""), vbNormalFocus
I'm sure this is simple. However, I can't work out how to input the program and file address into the shell command if I already have them as variables in my code.
E.g., This doesn't work: ProgID =Shell(ProgAddress & FileAddress), vbNormalFocus
Please can someone help.
Many thanks in advance.