update excel file

I need a vb program that can open
Excel file A and update all its links
in the background. (without user's
interaction)





yliu8Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
mbah022100Connect With a Mentor System enigineerCommented:
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
 
mbah022100System enigineerCommented:
Don't stop debugging without setting the created object to nothing. This may result in leaving an unrelated excel session in memory.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.