Solved

update excel file

Posted on 2000-03-13
2
136 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
[X]
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
  • 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

690 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