Hi,
it works fine but could it be possible to bypass the password if I've set in file B?
Thanks in advance, Clara
Bill Manville wrote:
[Quoted Text] >The only way you will get file B to contain up to date data is to open >it. You could have file A open and close file B on startup. > >Sub RefreshFromFileB() > Dim WS As Worksheet > Dim QT As QueryTable > Application.ScreenUpdating = False > Workbooks.Open ThisWorkbook.Path &"\FileB.xls" > For Each WS In ActiveWorkbook.Worksheets > For Each QT In WS.QueryTables > QT.Refresh BackgroundQuery:=False > Next > Next > ActiveWorkbook.Save > ActiveWorkbook.Close False > Application.ScreenUpdating = True >End Sub > >Sub Auto_Open() > ' update from FileB when I've finished opening. > Application.OnTime Now,"RefreshFromFileB" >End Sub > >Bill Manville >MVP - Microsoft Excel, Oxford, England >No email replies please - respond to newsgroup
-- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.aspx/excel-links/200608/1
|