Hello,
Any help with this will be appreciated! I am getting a bit stressed over it.
The below code is working on my system, as well as hundreds of other systems around my business.
However, there is one place it isn't working, (Italy) and the only difference is that their version of excel is Service Pack 3 and mine is Service Pack 2. I have checked Add-Ins etc and they all look the same...
Any ideas?
Thanks!
Sub Copy_to_LCCLog()
'Copies all of the information from the LCCTemplate into the IntLog.xls
'File path is FN
Dim FN As String
Dim wb1 As Workbook
Set wb1 = ActiveWorkbook
Dim Row As String
FN = Range("db17")
Sheets("Template LCC").Select
ActiveSheet.Unprotect
ActiveSheet.Shapes("Rectangle 31").Visible = False
ActiveSheet.Shapes("Rectangle 56").Visible = True
ActiveSheet.Shapes("Rectangle 30").Visible = True
Range("y6").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.ScreenUpdating = False
Row = 2
Row_dub = 0
Sheets("Customer Log").Select
Calculate
Range("A10").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
TimeID = Cells(10, 1).Value
Range("A13:AT13").Select
Selection.Copy
Workbooks.Open Filename:=FN
Worksheets("Customer_Log").Select
Range("a1").Select
Do While Cells(Row, 1) <> ""
If Cells(Row, 1) = TimeID Then Row_dup = Row
Row = Row + 1
Loop
If Row_dup > 0 Then Row = Row_dup
[COLOR=black]Cells(Row, 1).Select[/COLOR]
[COLOR=red]Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _[/COLOR]
[COLOR=red]:=False, Transpose:=False[/COLOR]
'add Barcorp Log
Windows("IntLog.xls").Activate
Sheets("BarcorpCont_Log").Select
Row = 2
Do While Cells(Row, 1) <> ""
If Cells(Row, 1) = TimeID Then
Range(Cells(Row, 1), Cells(Row, 14)).Select
Selection.Delete Shift:=xlUp
Row = Row - 1
End If
Row = Row + 1
Loop
Endrow = Row
ThisWorkbook.Activate
Sheets("BarcorpCont Log").Select
Row = 4
Do While Cells(Row, 3) <> ""
Row = Row + 1
Loop
Range("A15:P19").Select
Selection.Copy
Windows("IntLog.xls").Activate
Sheets("BarcorpCont_log").Select
If Row > 4 Then
Cells(Endrow, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
'add Facility
Windows("IntLog.xls").Activate
Sheets("FacilityDetails_Log").Select
Row = 2
Do While Cells(Row, 1) <> ""
If Cells(Row, 1) = TimeID Then
Range(Cells(Row, 1), Cells(Row, 14)).Select
Selection.Delete Shift:=xlUp
Row = Row - 1
End If
Row = Row + 1
Loop
Endrow = Row
ThisWorkbook.Activate
Sheets("Facility Details").Select
Row = 4
Do While Cells(Row, 3) <> ""
Row = Row + 1
Loop
Range("A15:AN22").Select
Selection.Copy
Windows("IntLog.xls").Activate
Sheets("FacilityDetails_log").Select
If Row > 4 Then
Cells(Endrow, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
ThisWorkbook.Activate
Sheets("Customer Log").Select
Range("A10").Select
ActiveCell.FormulaR1C1 = "='Template LCC'!R[-4]C[24]"
Windows("IntLog.xls").Activate
Selection.AutoFilter Field:=1, Criteria1:="0"
Rows("2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("A1").Select
Selection.AutoFilter Field:=1
ActiveWorkbook.Save
ActiveWorkbook.Close
ThisWorkbook.Activate
Sheets("Template LCC").Select
Range("y6").Select
Selection.Copy
Range("CW1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E6").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingColumns:=True, AllowFormattingRows:=True, _
AllowInsertingRows:=True, AllowDeletingRows:=True
End Sub
Display More