Good afternoon.
I've written a bit of code that copies the cell you've got selected, switches over to a schedule and then pastes that value in the next available cell in a named range of cells.
My code is as follows:
When running this code, I'm getting the following error:
"Run-time error '1004':
Application-defined or object-defined error"
By stepping through (F8), it seems to fail at the following line of code:
If someone could provide a solution to this, it would be greatly appreciated.
Thank you.
Regards
Martin
I've written a bit of code that copies the cell you've got selected, switches over to a schedule and then pastes that value in the next available cell in a named range of cells.
My code is as follows:
Code:
Sub CopytoSchucoSchedule()
Dim FindBlank As Range
Application.ScreenUpdating = False
ActiveSheet.Select
Selection.Copy
With SchucoSchedule
.Visible = -1
.Select
Set FindBlank = Range("SchucoDescriptionText").Find(What:="", lookat:=xlWhole)
FindBlank.Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End With
With SchucoSchedule
.Visible = 2
End With
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
When running this code, I'm getting the following error:
"Run-time error '1004':
Application-defined or object-defined error"
By stepping through (F8), it seems to fail at the following line of code:
Code:
Set FindBlank = Range("SchucoDescriptionText").Find(What:="", lookat:=xlWhole)
If someone could provide a solution to this, it would be greatly appreciated.
Thank you.
Regards
Martin