Solved

Invalid Procedure Call or Argument Message

Posted on 2011-02-24
7
585 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
  • 4
  • 2
7 Comments
 
LVL 75
ID: 34975982
Does that path and file already exist ?

mx
0
 
LVL 119

Expert Comment

by:Rey Obrero
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 119

Expert Comment

by:Rey Obrero
ID: 34976456
who is Capacorn?
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 34976493
replace "notepad "  with "explorer "
0
 
LVL 119

Expert Comment

by:Rey Obrero
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Report that will show table changes 7 45
Help writing a query 6 72
MS Access VBA Print PDF just Current Page 9 11
Access coding 2 11
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now