Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a file and updated excel links?

Status
Not open for further replies.

PLCdeveloper

Technical User
Jul 14, 2003
10
US
Hi all,

I'm trying to use VBA to open an existing Excel 97 workbook, Update the links in the workbook, and then SaveAs the workbook with a filename that is just the current date. Then, quit Excel.

The excel file that needs to be opened is in the same directory that the 'save as' file will be saved in. I've seen several similar chunks of code, but not one that updates the excel file's links...
As you can probably guess i am a VBA newbie. Thanks in advance...
-Paul


 
Have you tried to play with the Macro Recorder ?

Hope This Help
PH.
 
The app i am running that uses VBA doesn't have a macro recorder. But you have givenme an idea, could i record the macro in Excel and then patch the majority of the code into my other 'host' application (something called RSView)?
Thanks...
 
Absolutely, it's exactly what I suggested.
However, take care to prefix most of the references in the pasted code with your Excel.Application object instantiated in the RSView project.

Hope This Help
PH.
 
Thanks PHV,
Yep, the macro recorder helped; it let me build some basic code. Then, by browsing this website I found some other snippets to patch in there.
Cheers to all

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top