Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2007

Tip: Looking for answers? Try searching our database.

Firing Up Excel from within Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rfuscjr - 09 Mar 2007 15:40 GMT
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....
Van T. Dinh - 10 Mar 2007 04:48 GMT
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
========

Signature

HTH
Van T. Dinh
MVP (Access)

>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....
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.