G
Graham Y
I need to copy some date out of some xl files, the trouble is they have
Workbook_Open macro's & Links to other files, and I can't figure out how to
open the files without being asked about upating the links, and then are the
Workbook_Open macro's going to give me greif?
How can I stop xl asking the questions?
These are the first lines of code...
fn & mth are supplied strings, for files I know exist
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.DisplayAlerts = False
On Error Resume Next
Set wbCVR = Workbooks(fn) 'Have I
got file open?
If wbCVR Is Nothing Then
'No - open it
On Error GoTo 0 'if not
able to open goto error
Workbooks.Open Filename:=".\" & mth & "\" & fn, ReadOnly:=True,
Notify:=False
Set ws = ActiveWorkbook.Worksheets("By Staff")
Else
wbCVR.Activate
'Yes - use it
Set ws = wbCVR.Worksheets("By Staff")
End If
TIA
Workbook_Open macro's & Links to other files, and I can't figure out how to
open the files without being asked about upating the links, and then are the
Workbook_Open macro's going to give me greif?
How can I stop xl asking the questions?
These are the first lines of code...
fn & mth are supplied strings, for files I know exist
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.DisplayAlerts = False
On Error Resume Next
Set wbCVR = Workbooks(fn) 'Have I
got file open?
If wbCVR Is Nothing Then
'No - open it
On Error GoTo 0 'if not
able to open goto error
Workbooks.Open Filename:=".\" & mth & "\" & fn, ReadOnly:=True,
Notify:=False
Set ws = ActiveWorkbook.Worksheets("By Staff")
Else
wbCVR.Activate
'Yes - use it
Set ws = wbCVR.Worksheets("By Staff")
End If
TIA