[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Invalid Procedure Call or Argument Message

Posted on 2011-02-24
7
Medium Priority
?
610 Views
Last Modified: 2012-05-11
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

0
Comment
Question by:pcalabria
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 75
ID: 34975982
Does that path and file already exist ?

mx
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34976173
try this


Dim strAppName As String
   
    strAppName = "C:\database\temp.txt"
    Call Shell("notepad " & strAppName, 1)
0
 

Author Comment

by:pcalabria
ID: 34976443
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
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34976456
who is Capacorn?
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 34976493
replace "notepad "  with "explorer "
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34976610
you can also use

followhyperlink strAppName
0
 

Author Comment

by:pcalabria
ID: 34977038
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!
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question