rjplante
Well-known Member
- Joined
- Oct 31, 2008
- Messages
- 574
- Office Version
- 365
- Platform
- Windows
I get a run time error '1004' Application-defined or object-defined error. My code debugger highlightes the line below. What does this mean?
Thanks for the help.
Robert
Here is the blow of code surrounding this line.
Thanks for the help.
Robert
Rich (BB code):
Sheets("Bag Data Transfer").Range("A2:End(xlRight)").Copy
Here is the blow of code surrounding this line.
Rich (BB code):
' TRANSFER BAG SET DATA AND OVERWRITE EXISTING DATA
File1 = ActiveWorkbook.Name
Application.ScreenUpdating = False
'open QC Data trendline workbook
ChDir "\\Ferrari\common\Product QC\BioPrep QC\PrepaCyte-CB\PrepaCyte-CB QC\510k Lot Testing\PCB QC Trendline Data"
Workbooks.Open Filename:= _
"\\Ferrari\common\Product QC\BioPrep QC\PrepaCyte-CB\PrepaCyte-CB QC\510k Lot Testing\PCB QC Trendline Data\PCB Bag Set Trendline.xlsm"
ActiveSheet.Unprotect Password:="bioe1025"
Range("DA1").ClearContents
Workbooks(File1).Activate
Sheets("QC5003.5B FINAL QC BAG SET").Visible = True
Sheets("QC5003.5B FINAL QC BAG SET").Range("Z15").Copy
Workbooks("PCB Bag Set Trendline.xlsm").Activate
Sheets("Bag Set Data").Range("DA1").PasteSpecial Paste:=xlPasteValues
Workbooks(File1).Activate
' copy data
Sheets("Bag Data Transfer").Visible = True
Sheets("Bag Data Transfer").Range("A2:End(xlRight)").Copy
Workbooks("PCB Bag Set Trendline.xlsm").Activate
'Loop to find row
Range("A2").Select
Do
If ActiveCell.Value <> Range("DA1").Value Then
Selection.Offset(1, 0).Select
End If
Loop Until ActiveCell.Value = Range("DA1").Value
ActiveCell.Offset(0, 1).Select
ActiveCell.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End If
ActiveSheet.Protect Password:="bioe1025"
ActiveWorkbook.Save
ActiveWorkbook.Close