Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Open a access database using VBA

I already know how to open an instance of Access using the
application.ActivateMicrosoftApp = xlMicrosoftAccess. But what I havent been
able to get is a way to just open a specific database from excel vba. I dont
want to edit data from access to excel or vice versa. I just want a button
that says start this specific database. The data base is stored under
"C:\Data\Access\CustomerCare.mdb". Is any one able to help me with this.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default Open a access database using VBA

What are you trying to do? That will help avoid giving you an answer you don't want. I can give you ADO code for opening an instance
of a specific db from Excel, but the purpose of the code is to run a query against data in the db and bring it over to Excel. You
seem to be saying you don't want that. You also don't seem to want the database to just open up and appear on the screen, but I
can't tell.

--
RMC,CPA


"Kryer" wrote in message ...
I already know how to open an instance of Access using the
application.ActivateMicrosoftApp = xlMicrosoftAccess. But what I havent been
able to get is a way to just open a specific database from excel vba. I dont
want to edit data from access to excel or vice versa. I just want a button
that says start this specific database. The data base is stored under
"C:\Data\Access\CustomerCare.mdb". Is any one able to help me with this.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default Open a access database using VBA

Try Windows scripting maybe:


Sub test()
Dim objshell As Object

Set objshell = CreateObject("Wscript.Shell")
objshell.Run """C:\Program Files\Microsoft Office\Office11\MSAccess.exe"" "
& _
"""C:\Program Files\Microsoft Office\Office11\Samples\Northwind.mdb""",
1, False

If Err.Number Then
Wscript.Echo "Some horrible error: " & Err.Number & " (" &
Err.Description & ")"
End If

End Sub



"Kryer" wrote in message
...
I already know how to open an instance of Access using the
application.ActivateMicrosoftApp = xlMicrosoftAccess. But what I havent
been
able to get is a way to just open a specific database from excel vba. I
dont
want to edit data from access to excel or vice versa. I just want a button
that says start this specific database. The data base is stored under
"C:\Data\Access\CustomerCare.mdb". Is any one able to help me with this.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Access Database with VBA Bubba Excel Discussion (Misc queries) 1 July 19th 05 10:53 PM
Open Access Database with VBA Keith Excel Discussion (Misc queries) 1 June 1st 05 07:18 PM
Open Access Database through Excel jojo Excel Programming 3 March 3rd 05 06:53 PM
How do I open Access database from Excel Nico Excel Programming 1 December 14th 04 01:06 PM
Can't re-open Access database from Excel VBA Helge V. Larsen[_3_] Excel Programming 0 November 4th 04 09:03 AM


All times are GMT +1. The time now is 01:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"