Solved

update excel file

Posted on 2000-03-13
2
130 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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now