Opening Access from Excel and vice-versa

tryder

New Member
Joined
Jan 27, 2004
Messages
2
This is my first post here, and maybe my third anywhere. Feedback welcome.

Here's my pboblem:
I'd like to write vb code in an Access module so that I can open a closed Excel workbook (in a file on one of my drives), retrieve data from a worksheet and take it back to to my Access module. I don't want to import or link the worksheet.

Id like to be able to reverse the process, that is, from the vb code for an Excel macro, I want to write code to open a closed Access database (on my computer), open a table or run a query, grab some data and go back to my Excel workbook and macro.

I just need the code for opening the application, I know what to do once I get inside.

I've tried the code from "Mr. Excel on Excel" (pp431-432) and I get an "Object Needed" (or something like that) message.

Thanks in advance.
Terry
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You need to set a reference to the Excel Object library in the Access VisualBasic editor (Tools menu in the VBE)

Likewise in Excel you need to set a reference to the Access Object library from the Excel VBE

See my note on how to do it here (a Word example but the same principal applies)

http://www.mrexcel.com/board2/viewtopic.php?t=75176

Hope this helps
 
Upvote 0

Forum statistics

Threads
1,221,618
Messages
6,160,872
Members
451,674
Latest member
TJPsmt

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