needing to run macro on open BEFORE pompted to update links


Posted by Daniel P. on November 20, 2001 9:51 AM

(Copy of post on November 19, 2001 at 13:20:11, problem stems from vlookup using network files)

I have a workbook (called master) that has cells that are linked to another worksheet (called values) by vlookup.

To avoid network issues, I'm wanting to run a macro on open of "master" that will open the "values" workbook.
I'm not very experienced in VBA. I tried a Workbook_Open macro but the "values" workbook opens after I'm prompted to update the links. Any suggestions?

Thanks,
Daniel P.

Posted by Dank on November 20, 2001 10:24 AM

Hello Daniel,

How about putting this code in your 'master' workbook open event?

HTH,
Daniel.

Private Sub Workbook_Open()
Dim wb As Workbook

Set wb = Workbooks.Open("C:\temp\values.xls", False)

'Then do whatever you want
'

'Then you can update links of values workbook (if you want)
wb.UpdateLink wb.LinkSources
End Sub

Posted by Daniel P. on November 20, 2001 11:54 AM

Re: needing to run macro ... further help needed

Still getting prompted to update before the macro runs. Is there a way to turn auto-update off for this workbook?

Daniel P.



Posted by Daniel P. on November 20, 2001 11:59 AM

nevermind, thanks for your help!

nevermind... found what I was looking for. Thanks for your help.