MAIN_CPE
07-26-2010, 10:15 AM
Hello All,
I am new to forums and figured I'd turn to someone out here to possible give me a handle with this problem.
The problem that I am having is that I keep getting the error: Run-time error '1004': Application-defined or object-defined error. When I check my code it is having difficulties with the line Cells(C, 2).Select. :banghead: I was wondering if any knows how to fix this. THANKS FOR THE HELP!!
HERE'S MY CODE:
Loop
'****SELECT SUPPORT INFORMATION*******
Do While Sheets("CURRENT SHIFT").Cells(D, 1).Value <> ""
D = D + 1
E = D - 1
Range(Cells(E, 2), Cells(E, 9)).Select
Selection.Copy
Sheets("BACKLOG").Select
Do While Sheets("BACKLOG").Cells(C, 2).Value <> ""
C = C + 1
Loop
Cells(C, 2).Select
ActiveSheet.Paste
Cells(C, 10) = DTE
Cells(C, 11) = SUP
Range(Cells(C, 2), Cells(C, 11)).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Sheets("CURRENT SHIFT").Select
Selection.ClearContents
Loop
End Sub
I am new to forums and figured I'd turn to someone out here to possible give me a handle with this problem.
The problem that I am having is that I keep getting the error: Run-time error '1004': Application-defined or object-defined error. When I check my code it is having difficulties with the line Cells(C, 2).Select. :banghead: I was wondering if any knows how to fix this. THANKS FOR THE HELP!!
HERE'S MY CODE:
Loop
'****SELECT SUPPORT INFORMATION*******
Do While Sheets("CURRENT SHIFT").Cells(D, 1).Value <> ""
D = D + 1
E = D - 1
Range(Cells(E, 2), Cells(E, 9)).Select
Selection.Copy
Sheets("BACKLOG").Select
Do While Sheets("BACKLOG").Cells(C, 2).Value <> ""
C = C + 1
Loop
Cells(C, 2).Select
ActiveSheet.Paste
Cells(C, 10) = DTE
Cells(C, 11) = SUP
Range(Cells(C, 2), Cells(C, 11)).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Sheets("CURRENT SHIFT").Select
Selection.ClearContents
Loop
End Sub