If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > VLookup data update request is processing before WorkBook_Open event.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-23-05, 09:07
daveo61 daveo61 is offline
Registered User
 
Join Date: Feb 2005
Location: England.
Posts: 232
VLookup data update request is processing 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...

Code:
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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