Open an Excel workboon in the background

Posted on 2005-04-01
Medium Priority
Last Modified: 2010-05-02
How can I open an Excel workbook in the background, without making it visible to the user ?
Question by:rajesh_khater
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

aguppy earned 450 total points
ID: 13682553
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 !!

Assisted Solution

ShawnCorbett earned 300 total points
ID: 13682790
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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question