Can I write MS Excel Code inside MS Access module ?

HelpMoses76

Member
Local time
Today, 08:36
Joined
Sep 17, 2020
Messages
45
Hi

Can I actually write MS Excel Code inside an MS Access module and have the operations done on an Excel File specified in MS Access code?
 
Can I actually write MS Excel Code inside an MS Access module and have the operations done on an Excel File specified in MS Access code?

Yes..
See YouTube:-

Table to Many Excel Sheets - Nifty Access​


AND:-

Access Table to Many Excel Sheets

Excel Sheets From Access Table

Show/Hide & Export to Excel

Update Excel from MS Access

I use BTAB Development Code Here:-
Export A Table Or Query To Excel – Specific Worksheet on Specific Workbook

 
Last edited:
It is called an Excel Application Object.

If you open this, you have "real" Excel open on a real Excel-related file like .XLSX or .XLS or some similar file type. If you have the correct references for your VBA, you are able to manipulate Excel objects from an Access application. Uncle Gizmo has some great videos on the subject. For supplemental reading, look up the name I gave you in the first line of this post.
 
an I actually write MS Excel Code inside an MS Access module and have the operations done on an Excel File specified in MS Access code?
I fact you can write vba code in Acess to control all Office products (Outlook, Excel, Power Point, etc.)
Or vice versa.
 
Take # five..

Or you can use VB script and not even use any office app to host a code that will be very similar to vba.

Yee-Haw!
 
This is an excellent article by Doug Steele:- Excelling Automatically The article has a good explanation of early and late binding and why you should use either one and when...
 
Good reminder, thanks UG.
Just today actually I passed my boss a tiny MS Access tool for administrative use. I had spoiled myself with Excel early binding (which I don't often do, and not sure really why I had done it this time). I have 365 and he has 2010. The references did not backwards adjust and caused the usual problem. I switched to late binding and all was well. I'm rusty in Access..that's my excuse for my silly forgetfulness.
 

Users who are viewing this thread

Back
Top Bottom