Opening an mdb from code

A

Alan B. Densky

I want to open an mdb from within another mdb by clicking a button. I guess
that I've got my quotes messed up though, because I can't get it to work:


Dim stAppName As String

' stAppName = "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE
C:\My Documents\Neuro-VISION\SelfGrowthScraper\settings.mdb"

stAppName = "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" & "
" & "C:\My Documents\Neuro-VISION\SelfGrowthScraper\settings.mdb"
Call Shell(stAppName, 1)

Can somebody please straignten me out?

Thanks in advance.

Alan
 
D

Douglas J. Steele

Because of the spaces in path, you need double quotes:

stAppName = """C:\Program Files\Microsoft Office\Office\MSACCESS.EXE""" &
" " & "C:\My Documents\Neuro-VISION\SelfGrowthScraper\settings.mdb"
Call Shell(stAppName, 1)
 
A

Alan B.

Thank you Doug.

Regards,
Alan


Douglas J. Steele said:
Because of the spaces in path, you need double quotes:

stAppName = """C:\Program Files\Microsoft Office\Office\MSACCESS.EXE""" &
" " & "C:\My Documents\Neuro-VISION\SelfGrowthScraper\settings.mdb"
Call Shell(stAppName, 1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top