Solved

Invalid Procedure Call or Argument Message

Posted on 2011-02-24
7
584 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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

12 Experts available now in Live!

Get 1:1 Help Now