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 / ActiveX Controls / July 2005

Tip: Looking for answers? Try searching our database.

Opening Excel SPreadsheet via MSAccess

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MJatAflac - 19 Jul 2005 18:21 GMT
I am trying to open an existing excel sheet from within an Access db.

Here is the code as it stands:

 Set oApp = CreateObject("Excel.Application")
   oApp.Visible = True
      oApp.UserControl = True
   Dim oSheet As Object
   Set oSheet = GetObject("C:\Documents and Settings\E09461\My
Documents\Access Db's\Development\MetricsDashboardReport.xlt")

This works in a way... It opens the spreadsheet but when I go to view it,
the sheet is hidden. Is there a way for me to "unhide" it?

Thanks
Douglas J. Steele - 19 Jul 2005 22:31 GMT
The problem is that while you've create an instance of Excel (oApp) and made
it visible, you're not actually using that object to hold your spreadsheet.

Try:

 Set oApp = CreateObject("Excel.Application")
  Dim oSheet As Object
  Set oSheet = oApp.Workbooks.Open "C:\Documents and Settings\E09461\My
Documents\Access Db's\Development\MetricsDashboardReport.xlt"
   oApp.Visible = True
   oApp.UserControl = True

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I am trying to open an existing excel sheet from within an Access db.
>
[quoted text clipped - 11 lines]
>
> Thanks
 
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.