update Link

W

wssparky

Im running a program in VB6 that opens an Excel workbook, The workbook
has links to other workbooks. I want it to just open, get all of the
info. from the other links and show it to me, and print the sheet.
The problem is that I can’t get it to stop asking “ Do you want to
update the links to other workbooks”. Yes I do, do it without asking.
I have tried several automated “update link” ideas I found and nothing
is working.
Below is what I have now.
Any help Please !


Set m_XLApp = Excel.Application
m_XLApp.Visible = False
Set m_XLWorkbook = m_XLApp.Workbooks.Open(FileNamePath)
ActiveWorkbook.UpdateLink Name:="C:\TestTime\TimeSheet.xls",
Type:=xlExcelLinks
m_XLWorkbook.RunAutoMacros Which:=xlAutoOpen
m_XLWorkbook.RunAutoMacros Which:=xlAutoActivate
m_XLApp.DisplayAlerts = False ' suppress warning messages
m_XLWorkbook.Sheets().Select
m_XLWorkbook.Sheets.PrintOut

wssparky
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top