Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening access database and running access macro from excel

Status
Not open for further replies.

Hosacans

Technical User
Dec 15, 2004
64
US
Hi,

I been wanting to figure out a way to open and run an Access database from excel.

i currently use a excel macro to reformat a text file to fit the formats and field names of my access database. after reformatting.. i would maually open the access database and run a series of access macros to generate the reports.

How can i VBA code my excel macros to open my access database and instruct it to run the initiate access macro?

I tried playing around with the OpenDatabase command.. but no progress.. please help

Thanks so much
 

Hi,

Check out Data/Get External Data/New Database Query -- Access files -- YOUR DATABASE -- YOUR ACCESS QUERY...

No VBA code required at all!

Skip,

[glasses] [red]Be Advised![/red] For those this winter, caught in Arctic-like calamity, be consoled...
Many are cold, but few are frozen![tongue]
 
Hi skip,

Thanks for the intructions...

but is there anyway to initiate an access macro instead of a query?

also i would like to translate this process into VBA so i can include it in my excel macro. will i be able to capture it in vba code with the record macro function?

thanks

Hosackies
 
Hi Skip,

I just had another thought... is it possible to run an action within my access macro to trigger the excel macro. I've considered the RunModule action, but i'm not on how to run an excel vba module with access vba..

Please advise

Thanks
Hosackies
 


In Tools/References you could add a reference to the other application workbook/database VB project.

Skip,

[glasses] [red]Be Advised![/red] For those this winter, caught in Arctic-like calamity, be consoled...
Many are cold, but few are frozen![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top