Macro or VBA to Open ODBC Database Wizard

Liz_I3

Well-known Member
Joined
Dec 30, 2002
Messages
647
Office Version
  1. 2016
Platform
  1. Windows
Hi
Is it possible in Access 2010 to create a macro or vba to open the Get External Data ODBC Database wizard? In the same way as if you clicked on the ODBC Database button on the ribbon under External Data

Thanks
L
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
have you tried recording the action and seeing if it is captured
 
Upvote 0
I knew you could record a macro in excel but is it possible in Access?
 
Upvote 0
ther you have me, I haven't used access for ages
 
Upvote 0
What are you actually trying to do? Assuming connect to a database, what kind, for what purpose?
Edit: note, and no, no recording macros in MSAccess.
 
Last edited:
Upvote 0
There are 2 tables we have to replace daily they are not linked they are views from a sql server . I wanted a button that would open up the ODBC Wizard.
 
Upvote 0
Why do you need to replace a table everyday?
 
Upvote 0
I'm asking b/c in general I would try to just do that automatically. Or if that's not possible, using the existing data wizards just like presumably you are already doing. As far as getting the same wizard you have in Excel, probably not going to work.
 
Last edited:
Upvote 0
The tables should be a link to just refresh but our IT has set it up to replace tables daily. Iam not trying to get Excels wizard. In Access on the Ribbon under External Data Then in Import and Link there is a Icon/button ODBC Database. I wanted to program my on button to open that ODBC Database icon on the Access Ribbon (when you click it on the ribbon it opens up a wizard). I was thinking SendKey may work but can't find any code to access Ribbon selections

Thanks for you help
Liz
 
Upvote 0
You can add button to your QAT for easy access in one click. Personally I'd think it's still possible to try to automate this if you know what the changing information is. Not really sure what's changing (for instance, you can create new tables every day but if they have the same name then Access wouldn't care about it).
 
Upvote 0

Forum statistics

Threads
1,221,810
Messages
6,162,108
Members
451,743
Latest member
matt3388

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