Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / January 2004



Tip: Looking for answers? Try searching our database.

Shelling an access mdb file from vb 6

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stacey Howard - 25 Jan 2004 17:15 GMT
I would like to shell out to acces and open a particular mdb file when
exiting my vb app. How can I do this. here is what I have so far but to not
avail.

Shell ("C:\Program Files\Microsoft Office XP\Office10\MSACCESS.EXE" &
App.Path & "\CheckManagerXP.mdb")

Any advice would be greatly appreciated.

Stacey
Paul Clement - 26 Jan 2004 17:24 GMT
¤ I would like to shell out to acces and open a particular mdb file when
¤ exiting my vb app. How can I do this. here is what I have so far but to not
¤ avail.
¤
¤ Shell ("C:\Program Files\Microsoft Office XP\Office10\MSACCESS.EXE" &
¤ App.Path & "\CheckManagerXP.mdb")
¤
¤

Try using the ShellExecute API function call:

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
                  (ByVal hwnd As Long, ByVal lpszOp As String, _
                   ByVal lpszFile As String, ByVal lpszParams As String, _
                   ByVal LpszDir As String, ByVal FsShowCmd As Long) _
                   As Long

Sub LaunchAccess()

Const SW_SHOWNORMAL = 1
 
ShellExecute 0&, "Open", "e:\My Documents\Accessdb.mdb", "", "e:\My Documents\", SW_SHOWNORMAL

End Sub

Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.