LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default VLookups data updating before WorkBook_Open event.

Guys, I have a sheet which has VLOOKUPs onto a different workbook. Also,
within this sheet I have a function which copies the lastest version of a
file down, which I actually want the VLOOKUPs to look at.

The code I have is...

Private Sub Workbook_Open()

On Error Resume Next

Dim fsoFileObject As Object
Dim folFolder As Object

Dim strFileLocation As String
Dim strSC3Location As String

strFileLocation = "C:\SC3"
strSC3Location = "\\ias_01\Statistics\Affinity\Affinity 2004\Affinity Costs
2004\Backup2004.xls"

Set fsoFileObject = CreateObject("Scripting.FileSystemObject")

If Not fsoFileObject.FolderExists(strFileLocation) Then
Set folFolder = fsoFileObject.CreateFolder(strFileLocation)
End If

Application.DisplayAlerts = False

If fsoFileObject.FileExists(strFileLocation & "\Backup2004.xls") Then
Set folFolder = fsoFileObject.DeleteFile(strFileLocation &
"\Backup2004.xls")
End If

Application.DisplayAlerts = True

fsoFileObject.CopyFile strSC3Location, strFileLocation & "\Backup2004.xls",
False

End Sub

The issue I'm getting is that the sheet is asking if I wish to update the
links to get the fresh data before the WorkBook_Open event even fires off!
Any ideas how I could possibly slow this down at all, or how I can re-order
the data updates until WorkBook_Open is complete??

TIA.
 
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
Workbook_Open() Event Bill Martin Excel Discussion (Misc queries) 9 January 13th 06 08:24 PM
Workbook_open Event Bruce Maston Excel Programming 6 April 6th 04 01:19 AM
Workbook_Open Event Squid[_2_] Excel Programming 7 February 8th 04 06:49 PM
WorkBook_Open Event Squid[_3_] Excel Programming 1 February 8th 04 02:45 AM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM


All times are GMT +1. The time now is 10: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"