pcalabria
asked on
Invalid Procedure Call or Argument Message
I'm running code which is generating the following message.
Dim strAppName As String
strAppName = "C:\database\temp.txt"
Call Shell(strAppName, 1)
I'm pretty sure I've used this code before successfully, but its not working now. Any ideas?
Thanks
Dim strAppName As String
strAppName = "C:\database\temp.txt"
Call Shell(strAppName, 1)
I'm pretty sure I've used this code before successfully, but its not working now. Any ideas?
Thanks
try this
Dim strAppName As String
strAppName = "C:\database\temp.txt"
Call Shell("notepad " & strAppName, 1)
Dim strAppName As String
strAppName = "C:\database\temp.txt"
Call Shell("notepad " & strAppName, 1)
ASKER
mx,
Yes, I verified that the path and file do already exist. However, I did try to simplify my problem in the question. The actual file that I want to load uses an .htm extension and should open in my browser, Internet Explorer.
If I double click on the file from File Explorer, all opens as I would expect. However, for some reason the command does not cause IE to open the file. Even when I replace notepad in Capacorns example with IE.
Any ideas?
I need to award Capacorn the points because the solution works, but I really want to open the .htm file in IE. Can you still help?
Thanks
Yes, I verified that the path and file do already exist. However, I did try to simplify my problem in the question. The actual file that I want to load uses an .htm extension and should open in my browser, Internet Explorer.
If I double click on the file from File Explorer, all opens as I would expect. However, for some reason the command does not cause IE to open the file. Even when I replace notepad in Capacorns example with IE.
Any ideas?
I need to award Capacorn the points because the solution works, but I really want to open the .htm file in IE. Can you still help?
Thanks
who is Capacorn?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can also use
followhyperlink strAppName
followhyperlink strAppName
ASKER
capricorn1,
Sorry about the typos, I was sending from my PDA.
Not sure if I blame bad eyes or big fingers, but thanks for the help!
Sorry about the typos, I was sending from my PDA.
Not sure if I blame bad eyes or big fingers, but thanks for the help!
mx