I am trying to parse data from sheet1 into an array then printing it to another worksheet. I get an object required error, but from what I can gather from msdn is that my object types are wrong for the array but when I switch the array from string to variant I get a mismatch error instead. What can I do to fix the object required 424 error? Here's the code:
Private Sub Enter2_Click()
'Define Variables
Dim MatchRow As Integer
Dim data() As String
Dim row As Integer
Dim col As Integer
Dim dataInfo As String
Worksheets("Sheet1").Activate
'Match Name To A Row
MatchRow = WorksheetFunction.Match(RName.Value, Range("A1:A100"), 0)
For i = 0 To 22
Worksheets("Sheet1").Activate
Cells(MatchRow, i + 3).Select
data = Split(ActiveCell.Value, ".")
Worksheets("Reporting template").Activate
Cells(20, 1).Select
ActiveCells.Value = data(0) 'This is where the error pops up at
ActiveCells.Offset(0, 1).Select
ActiveCells.Value = data(1)
ActiveCells.Offset(0, 1).Select
ActiveCells.Value = data(2)
ActiveCells.Offset(0, 1).Select
ActiveCells.Value = data(3)
Next i
End Sub