Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7174805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:08:16+00:00 2026-05-28T16:08:16+00:00

I have been using the following command to open another MDB Access file via

  • 0

I have been using the following command to open another MDB Access file via VBA:

Shell "cmd /c " & Chr(34) & strNewFullPath & Chr(34), vbHide

strNewFullPath is the full path of the MDB file.
Works fine when using Access 2010, but doesn’t run on Access 2003.
If I run the command in a XP DOS terminal it DOES run.

What other command can I use that should work on Access 2003 up and with the Access Runtime?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:08:17+00:00Added an answer on May 28, 2026 at 4:08 pm

    You can use the Win32 API to find the EXE name associated with the file type and prepend it to your shell command like this:

    Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long
    
    Public Function GetExecutableForFile(strFileName As String) As String
       Dim lngRetval As Long
       Dim strExecName As String * 255
       lngRetval = FindExecutable(strFileName, vbNullString, strExecName)
       GetExecutableForFile = Left$(strExecName, InStr(strExecName, Chr$(0)) - 1)
    End Function
    
    Sub RunIt(strNewFullPath As String)        
       Dim exeName As String
    
       exeName = GetExecutableForFile(strNewFullPath)         
       Shell exeName & " " & Chr(34) & strNewFullPath & Chr(34), vbNormalFocus
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using the following CSS to apply an effect at the bottom
Ok, I have been using the following script for over a year now to
I having trouble in dividing the HTML frames. I have been using the following
I have been following the following post on using multiple ItemTemplates in a ListView
I have been using Indy to transfers files via FTP for years now but
I have been using python with regex to clean up a text file. I
I have been successful with extracting text from a PDF file using GhostScript along
I've been using the following command to grep for a string in all the
I have a batch file that I have been using to install my C#
We have been using CruiseControl for quite a while with NUnit and NAnt. For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.