Sub Place_Path()
Dim wb As Workbook
On Error Resume Next
ThisFile = Worksheets("MyStoreInfo").Range("C2")
Area = Worksheets("MyStoreInfo").Range("E8")
Region = Worksheets("MyStoreInfo").Range("F8")
District = Worksheets("MyStoreInfo").Range("C8")
M0nth = Worksheets("Schedule Dashboard").Range("F3")
CheckThis = M0nth & "Schedule" & ThisFile & ".xlsx"
fPath = ("[URL]http://infonet.abcdefg.com/sites/retail/WFM/[/URL]" & Area & "/" & Region & "/" & District & "/" & M0nth & "Schedule" & ThisFile & ".xlsx")
sstring = Replace(fPath, " ", "%20")
Sheets("MyStoreInfo").Range("G2") = sstring
Application.ScreenUpdating = False
Application.DisplayAlerts = False
BookName = CheckThis
Set wb = Workbooks.Open(Filename:=sstring)
BookCount = Workbooks.Count
For i = 1 To BookCount
If BookName = Workbooks(i).Name Then
BookCheck = 1
GoTo 1
Else: BookCheck = 2
End If
Next i
1 If BookCheck = 1 Then
For Each wb In Application.Workbooks ' Loop through each workbook
If wb.Name <> ThisWorkbook.Name Then ' Exclude this workbook
For Each ws In wb.Sheets ' Loop through each worksheet of each workbook
If ws.Name = "Week 1" Then
Sheets("Week 1").Select
Sheets("Week 1").Range("AT1").Copy
ThisWorkbook.Activate
Sheets("Schedule Dashboard").Select
Range("W11").Select
ActiveSheet.Paste
Range("F3").Select
End If
Next ws
End If
Next wb
For Each wb In Application.Workbooks()
If wb.Name <> ThisWorkbook.Name Then wb.Close wb.Saved = True
Next
End If
Application.DisplayAlerts = True
Application.ScreenUpdating = True
If BookCheck = 2 Then
Sheets("Schedule Dashboard").Range("W11") = "have not"
End If