Solved

update excel file

Posted on 2000-03-13
2
131 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DO Loop not working 4 72
add text to end of existing text in file 16 69
VBA: Select SQL query based on a config Sheet v2 11 38
Visual Studio 2005 text editor 10 35
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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

910 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

19 Experts available now in Live!

Get 1:1 Help Now