Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

Open an Excel workboon in the background

How can I open an Excel workbook in the background, without making it visible to the user ?
2 Solutions
try something like this ---

Option Explicit
Dim objExcel As Object     ' Excel application
Dim objBook As Object      ' Excel workbook
Dim objSheet As Object     ' Excel Worksheet


Set objExcel = CreateObject("excel.application")     'Starts the Excel Session
objExcel.Workbooks.Open filename      'Open the workbook filename - filename will need defined or replaced with "thisfile"
objExcel.Application.Visible = False      ' this hides it, make it true and it appears

have fun !!
Or if you don't even want it open at all Just use the data control. Set the connect property to 'excel'.  Set the database name to the name of your .xls and then change the recordsource to whatever worksheet your using. Presto instant excel access.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now