Hi All,
I'm getting a run-time 438 when attempting to copy and paste from one worbook to another. Any help appreciated.
Sub BoardSummary()
On Error Resume Next
Kill "\\Gbhitopsser0009\GMIT\Store_Cat_Data\Head Office\Central Planning\Adhoc tasks\Macro Folder\Board Summary\*.*"
On Error GoTo 0
Dim fso
Dim sfol As String, dfol As String, Path As String, FileName As String
Dim Sheet As Object
sfol = "\\mshsrmnsukp1228\tacticalreports\uk\Review Meeting\Board Summary\"
dfol = "\\Gbhitopsser0009\GMIT\Store_Cat_Data\Head Office\Central Planning\Adhoc tasks\Macro Folder\Board Summary\"
Dim Wkend As String
Wkend = Worksheets("Home").Range("AC4").Value
Dim Masterfile As String
Masterfile = "\\Gbhitopsser0009\GMIT\Store_Cat_Data\Head Office\Central Planning\Adhoc tasks\Macro Folder\Board Summary Master.xlsx"
Set fso = CreateObject("Scripting.FileSystemObject")
GM = "*" & Wkend & ".xlsx"
WW = "*" & "BdSum_BU 301 - " & Wkend & ".xlsx"
Ling = "*" & "BdSum_BU 302 - " & Wkend & ".xlsx"
MW = "*" & "BdSum_BU 303 - " & Wkend & ".xlsx"
KW = "*" & "BdSum_BU 304 - " & Wkend & ".xlsx"
Home = "*" & "BdSum_BU 305 - " & Wkend & ".xlsx"
Beauty = "*" & "BdSum_BU 307 - " & Wkend & ".xlsx"
fso.CopyFile (sfol & "GM Level\" & GM), dfol
fso.CopyFile (sfol & "\Womenswear\" & WW), dfol
fso.CopyFile (sfol & "\Lingerie\" & Ling), dfol
fso.CopyFile (sfol & "\Menswear\" & MW), dfol
fso.CopyFile (sfol & "\Kidswear\" & KW), dfol
fso.CopyFile (sfol & "\HomeFurnishings\" & Home), dfol
fso.CopyFile (sfol & "\Beauty\" & Beauty), dfol
Application.DisplayAlerts = False
Workbooks.Open Masterfile
Sheets("WWBS").Visible = True
Workbooks.Open dfol & WW
Sheets("G301").Range("B2:AT200").Copy
Workbooks("Board Summary Master.xlsx").Sheets("WWBS").Range("B2:AT200").Paste
Application.DisplayAlerts = True
End Sub
Bookmarks