Solved

# Shell execute API vb.net Launch a program

Posted on 2013-10-25
560 Views
Does an anyone know if it is possible to run an Access database without specifying the location of MCAccess.exe if so what is the syntax?

(My users have MSAccess.exe in various places) I thought of putting the location of the exe in a text file on the client but this is a bit clumsy.
0
Question by:HKFuey
• 2

LVL 21

Assisted Solution

CompProbSolv earned 150 total points
ID: 39601159
This should point you in the right direction:
http://support.microsoft.com/kb/317113

Dim oAccess As Access.Application

' Start a new instance of Access for Automation:
oAccess = New Access.ApplicationClass()

' Open a database in exclusive mode:
oAccess.OpenCurrentDatabase(filepath:="c:\mydb.mdb", Exclusive:=True)
0

LVL 75

Accepted Solution

käµfm³d   👽 earned 350 total points
ID: 39601170
If the user has the corresponding Access database files registered to open with Access (by default they would), then you can simply specify the database filename to Process.Start. If the user has changed the default application for such files, then they will opened using that program.

e.g.

System.Diagnostics.Process.Start("C:\path\to\database\file.accdb")

0

Author Comment

ID: 39601249
Thanks, will try after the weekend! ; )
0

Author Closing Comment

ID: 39605573
Works great, thanks!
0

## Featured Post

Question has a verified solution.

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

### Suggested Solutions

Title # Comments Views Activity
vb.net 1 month apart 11 35
Convert datetime to time string 10 28
I'm trying to understand this simple vb code! 2 22
How to repeat the data 4 18
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Simple Linear Regression
Progress

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

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