Solved

Vb syntax Visual Studio 2010: Shell syntax

Posted on 2013-10-25
2
333 Views
Last Modified: 2013-10-25
I am trying to launch an Access Database but it does not work: -
  Dim Pathstr As String
            Pathstr = "C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE"
            Dim Exestr As String
            Exestr = "C:\My Folder\My AccessDb.mdb"
            MsgBox(Pathstr & " " & Exestr)
            Shell(Pathstr & " " & Exestr)

Open in new window

I think it may be the spaces in the folder name, can anyone help?
0
Comment
Question by:HKFuey
[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
2 Comments
 
LVL 25

Accepted Solution

by:
chaau earned 500 total points
ID: 39599936
You are right. It is the spaces. You need to surround paths with double quotes:
Dim Pathstr As String
            Pathstr = """C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE"""
            Dim Exestr As String
            Exestr = """C:\My Folder\My AccessDb.mdb"""
    

Open in new window

0
 

Author Closing Comment

by:HKFuey
ID: 39600032
Super, thanks very much!
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

738 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