Firing Up Excel from within Access

  • Thread starter Thread starter rfuscjr via AccessMonster.com
  • Start date Start date
R

rfuscjr via AccessMonster.com

I have an Access form with a button. When clicked, it opens a variety of
queries which eventually lead to a final table. I want to add a line to
automatically open an Excel sheet I have linked to this table. Seems like it
should be simple enough but I have not been able to properly code it....
 
There are numrous ways to automate Excel but a quick way is to use the
inbuilt Menu Command "Analyze it with Microsoft Office Excel".

Quick & dirty sample code:
========
Public Sub AnalyseWithExcel()
DoCmd.OpenTable "Table1", acViewNormal, acEdit
DoEvents
Application.CommandBars("Menu Bar").Controls("Tools"). _
Controls("Office Links").Controls(3).Execute
End Sub
========
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top