smitmika99
New Member
- Joined
- Jul 5, 2018
- Messages
- 2
I have a master workbook called Paterson Bulk Service Records and then individual sheets in folders for each of the Master workbook sheets to link over (i've done it before for something else and I had no trouble but now i do)
The bold line is the one that has a Subscript Error and changes the individual sheet to 1(2) and it's just a pain! Someone please help me!
Sub wscopy()
Dim PatersonBulkServiceRecords, fleet1 As Workbook, ws11 As Worksheet
Set PatersonBulkServiceRecords = ThisWorkbook
Set fleet1 = Workbooks.Open("E:\Paterson Bulk Service Records.xlsx")
Set ws11 = PatersonBulkServiceRecords.Sheets("1")
Set ws21 = fleet1.Sheets("1")
ws21.Copy before:=ws11
fleet1.Close
Application.DisplayAlerts = False
ws11.Delete
Application.DisplayAlerts = True
PatersonBulkServiceRecords.Sheets("1(2)").Name = "1"
Application.ScreenUpdating = True
End Sub
The bold line is the one that has a Subscript Error and changes the individual sheet to 1(2) and it's just a pain! Someone please help me!
Sub wscopy()
Dim PatersonBulkServiceRecords, fleet1 As Workbook, ws11 As Worksheet
Set PatersonBulkServiceRecords = ThisWorkbook
Set fleet1 = Workbooks.Open("E:\Paterson Bulk Service Records.xlsx")
Set ws11 = PatersonBulkServiceRecords.Sheets("1")
Set ws21 = fleet1.Sheets("1")
ws21.Copy before:=ws11
fleet1.Close
Application.DisplayAlerts = False
ws11.Delete
Application.DisplayAlerts = True
PatersonBulkServiceRecords.Sheets("1(2)").Name = "1"
Application.ScreenUpdating = True
End Sub