you have enclosed your variable, MyFile in quotation marks, therefore it is not recognised as a variable but simply a string
so
OShell.Run "cmd /k TYPE " & MyFile, 5
should do it.
it might help you to build a string to start off wiht
s2Run = "cmd /k TYPE " & MyFile
Msgbox s2Run
oShell.run s2Run, 5
use this until you get better at scripting.
you should avoid it when you get better as you are creating a variable which isnt really required, other than to help with debugging, and will use up more memory.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.