I need to modify the macro below to not update the links in the workbook it is copying. Currently when I run this macro it asks me after each folder if i want to update or Don't update the links. Is there a way to add in code to not update each file so I dont have to keep answering the prompt 70+ times?
Dim z As Long, e As Long
Dim f As String, b As String, c As String
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Workbooks("master.xls").Sheets("Sheet1").Cells(1, 1) = "=cell(""filename"")"
Workbooks("master.xls").Sheets("Sheet1").Cells(1, 2) = "=left(A1,find(""["",A1)-1)"
Workbooks("master.xls").Sheets("Sheet1").Cells(2, 1).Select
f = Dir(Workbooks("master.xls").Sheets("Sheet1").Cells(1, 2) & "*.xls")
Do While Len(f) > 0
ActiveCell.Formula = f
ActiveCell.Offset(1, 0).Select
f = Dir()
Loop
z = Workbooks("master.xls").Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
For e = 2 To z
b = Workbooks("master.xls").Sheets("Sheet1").Cells(e, 1)
If b <> ActiveWorkbook.Name Then
c = Mid(Left(b, Len(b) - 4), 1, 30)
Workbooks.Open Filename:=Workbooks("master.xls").Sheets("Sheet1").Cells(1, 2) & Workbooks("master.xls").Sheets("Sheet1").Cells(e, 1)
Worksheets(MyInput).UsedRange.Copy 'Change sheetname if it is incorrect
ActiveWorkbook.Close False
Sheets.Add.Name = c
Sheets(c).Range("A1").PasteSpecial
End If
Next e
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Worksheets.Add().Name = "Summary"
MsgBox "collating is complete and summary sheet added."
' Local Variables
Dim wks As Worksheet
Dim rngLinkCell As Range
Dim strSubAddress As String, strDisplayText As String
' Step 1 : Loop through all worksheets
' 1a : Clear all current hyperlinks
Worksheets("Summary").Range("A:A").ClearContents
' 1b : Create Linked index list
For Each wks In ActiveWorkbook.Worksheets
Set rngLinkCell = Worksheets("Summary").Range("A65536").End(xlUp)
If rngLinkCell <> "" Then Set rngLinkCell = rngLinkCell.Offset(1, 0)
strSubAddress = "'" & wks.Name & "'!A1"
strDisplayText = wks.Name
Worksheets("Summary").Hyperlinks.Add Anchor:=rngLinkCell, Address:="", SubAddress:=strSubAddress, TextToDisplay:=strDisplayText
Next wks
End Sub
Dim z As Long, e As Long
Dim f As String, b As String, c As String
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Workbooks("master.xls").Sheets("Sheet1").Cells(1, 1) = "=cell(""filename"")"
Workbooks("master.xls").Sheets("Sheet1").Cells(1, 2) = "=left(A1,find(""["",A1)-1)"
Workbooks("master.xls").Sheets("Sheet1").Cells(2, 1).Select
f = Dir(Workbooks("master.xls").Sheets("Sheet1").Cells(1, 2) & "*.xls")
Do While Len(f) > 0
ActiveCell.Formula = f
ActiveCell.Offset(1, 0).Select
f = Dir()
Loop
z = Workbooks("master.xls").Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
For e = 2 To z
b = Workbooks("master.xls").Sheets("Sheet1").Cells(e, 1)
If b <> ActiveWorkbook.Name Then
c = Mid(Left(b, Len(b) - 4), 1, 30)
Workbooks.Open Filename:=Workbooks("master.xls").Sheets("Sheet1").Cells(1, 2) & Workbooks("master.xls").Sheets("Sheet1").Cells(e, 1)
Worksheets(MyInput).UsedRange.Copy 'Change sheetname if it is incorrect
ActiveWorkbook.Close False
Sheets.Add.Name = c
Sheets(c).Range("A1").PasteSpecial
End If
Next e
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Worksheets.Add().Name = "Summary"
MsgBox "collating is complete and summary sheet added."
' Local Variables
Dim wks As Worksheet
Dim rngLinkCell As Range
Dim strSubAddress As String, strDisplayText As String
' Step 1 : Loop through all worksheets
' 1a : Clear all current hyperlinks
Worksheets("Summary").Range("A:A").ClearContents
' 1b : Create Linked index list
For Each wks In ActiveWorkbook.Worksheets
Set rngLinkCell = Worksheets("Summary").Range("A65536").End(xlUp)
If rngLinkCell <> "" Then Set rngLinkCell = rngLinkCell.Offset(1, 0)
strSubAddress = "'" & wks.Name & "'!A1"
strDisplayText = wks.Name
Worksheets("Summary").Hyperlinks.Add Anchor:=rngLinkCell, Address:="", SubAddress:=strSubAddress, TextToDisplay:=strDisplayText
Next wks
End Sub