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
========
 
Back
Top