When trying to paste to target when I am not on that sheet, I get an error. Can anyone help, I do not understand why this is not working.
Sub rangeset()
Dim N As Long, NN As Long
Dim M As Long, col As Long
Dim s As String
Dim target As Range, source As Range
Set sh1 = ActiveWorkbook.Sheets("Output")
Set sh2 = ActiveWorkbook.Sheets("DataSet")
Application.Calculation = xlCalculationManual
Set target = ActiveCell
sh2.Activate
Call PericopeHeader
Sub PericopeHeader()
If IsNumeric(Left(ActiveCell.Text, 1)) = True Then
ActiveCell.Copy
sh1.[target].PasteSpecial <<<<< I get an error here saying object is required.
ActiveCell.Offset(1, 0).Select
End If
End Sub
Sub rangeset()
Dim N As Long, NN As Long
Dim M As Long, col As Long
Dim s As String
Dim target As Range, source As Range
Set sh1 = ActiveWorkbook.Sheets("Output")
Set sh2 = ActiveWorkbook.Sheets("DataSet")
Application.Calculation = xlCalculationManual
Set target = ActiveCell
sh2.Activate
Call PericopeHeader
Sub PericopeHeader()
If IsNumeric(Left(ActiveCell.Text, 1)) = True Then
ActiveCell.Copy
sh1.[target].PasteSpecial <<<<< I get an error here saying object is required.
ActiveCell.Offset(1, 0).Select
End If
End Sub