Solved

update excel file

Posted on 2000-03-13
2
133 Views
Last Modified: 2010-05-02
I need a vb program that can open
Excel file A and update all its links
in the background. (without user's
interaction)





0
Comment
Question by:yliu8
  • 2
2 Comments
 

Accepted Solution

by:
mbah022100 earned 50 total points
ID: 2615001
A way to do this is:

Dim objExcel As Object

Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open FileName:="Your file"


From this moment on you can do what ever excel can do. To find out what is possible, you can use Excel itself and record macro's to see what is possible.

If at debug time you want to see what your application is doing the following statement may help:

objExcel.Visible = True

To stop your excel session do the following:

objExcel.Quit
Set objExcel = Nothing

Hope this is what you wanted to know
0
 

Expert Comment

by:mbah022100
ID: 2615011
Don't stop debugging without setting the created object to nothing. This may result in leaving an unrelated excel session in memory.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

803 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