Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Macro - Auto Update Links


I have this piece of Code:


Code:
--------------------
Sub auto_open()
' For Auto Updating Linked Files
'---
'Workbooks.Open Filename:=ActiveWorkbook.Path & "\Test_file_02.xls", UpdateLinks:=1
'---
End Sub
--------------------


When I run this code from "File 1" everything updates automatically,
great.
However, "File 2" remains open. Is there away to close the file?

Any help would be appreciated.


--
joopdog
------------------------------------------------------------------------
joopdog's Profile: http://www.excelforum.com/member.php...o&userid=31336
View this thread: http://www.excelforum.com/showthread...hreadid=510162

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Macro - Auto Update Links


Try adding this line at the end:

ActiveWorkbook.Close True

Regards.


--
dbarelli
------------------------------------------------------------------------
dbarelli's Profile: http://www.excelforum.com/member.php...o&userid=31275
View this thread: http://www.excelforum.com/showthread...hreadid=510162

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Macro - Auto Update Links


Thanks!

It works great!


Code:
--------------------
Sub auto_open()
' For Auto Updating Linked Files
Application.ScreenUpdating = False
Workbooks.Open Filename:=ActiveWorkbook.Path & "\Test_file_02.xls", UpdateLinks:=1
ActiveWorkbook.Close True
Application.ScreenUpdating = True
End Sub
--------------------


It updates without a flicker. "Test_file_02.xls" closes when "File 1"
opens to run the "auto_open" macro. You can move the files from folder
to folder without a hitch. It works great.

Again Thanks alot.


--
joopdog
------------------------------------------------------------------------
joopdog's Profile: http://www.excelforum.com/member.php...o&userid=31336
View this thread: http://www.excelforum.com/showthread...hreadid=510162

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto update links kbear Excel Worksheet Functions 0 February 7th 08 10:22 PM
auto update links Mohamed Excel Discussion (Misc queries) 1 December 11th 07 12:34 AM
Links Update Auto? DDBeards Links and Linking in Excel 0 August 29th 06 03:58 PM
Auto Update Links [email protected] Excel Worksheet Functions 0 March 31st 05 08:37 AM
excel links update not working in auto, calculations in auto Mikey Boy Excel Worksheet Functions 0 December 7th 04 11:53 PM


All times are GMT +1. The time now is 09:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"