Macro to Open Access File.

ssingh75

Well-known Member
Joined
Jan 5, 2012
Messages
518
Dear All,

I've a Access database named "Abc.accdb", i want to open that database using Macro via Excel VBA.

pls assist.

Susheel
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Do you want to use excel to trigger access to open the db, or do you want to query the data into Excel? I'm guessing option 2
 
Upvote 0
If you mean physically open the file:

Code:
ActiveWorkbook.FollowHyperlink "C:\Abc.accdb", NewWindow:=True

Note you need to include the full directory path as well as the file name and extension.
 
Upvote 0
Solution
i want to Use Excel to open Access db using VBA.

Susheel

Jon's solution does that. If that's not working for you then I think you mean you need to pull data into Excel from the Access database. Can you please confirm this, or not.
 
Upvote 0
If you mean physically open the file:

Code:
ActiveWorkbook.FollowHyperlink "C:\Abc.accdb", NewWindow:=True

Note you need to include the full directory path as well as the file name and extension.
Thank you ??
If it doesn’t work only remove the “,NewWindow = true” from the code.
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top