Solved

Problem with shell cmd

Posted on 2004-08-20
4
454 Views
Last Modified: 2009-07-29
Hello,

I am trying to open an msaccess database from within another. I'm using the command

shell "c:\program files\microsoft office\office10\msaccess.exe /c:\path\filename.mdb"

THe problem is that not only does it open the database as I wish, but it also gives me two "Online Meeting" error messages:

1) The Online Meeting feature requires Microsoft NetMeeting 2.11 or later. You can either ... etc."
2) Unknown network error.

At first it was also opening NetMeeting, but with considerable difficulty I was able to finally remove it from my hard drive and registry.

Any ideas?

wileedingo
0
Comment
Question by:wileedingo
  • 2
4 Comments
 
LVL 15

Expert Comment

by:Colosseo
Comment Utility
Hi wileedingo

Have you tried just

shell "c:\path\filename.mdb"

Also to you get the errors when you just open the other db normally?

Scott
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 125 total points
Comment Utility
You don't need the forward slash (/) before your mdb file.  If the mdb filename has spaces in it then use double quotes around as shown below:

Private Sub Command1_Click()
    Shell "c:\program files\microsoft office\office10\msaccess.exe c:\path\filename.mdb"
End Sub

<or>

Private Sub Command1_Click()
    Shell "c:\program files\microsoft office\office10\msaccess.exe ""C:\Documents and Settings\Michael\My Documents\db1.mdb"""
End Sub

0
 
LVL 1

Author Comment

by:wileedingo
Comment Utility
Idle Mind - your first suggestion worked. Gee, and I spent all that time scrubbing Netmeeting off my hard drive. Oh well...  Incidentally, I had tried your second suggestion earlier, but it didn't work; do you think that's because there are no spaces in the path?

Scott - thanks, I had tried your suggestion as well without luck.
0
 
LVL 1

Author Comment

by:wileedingo
Comment Utility
Tricky with those double double-quotes.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 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

10 Experts available now in Live!

Get 1:1 Help Now