I have a form that I am trying to copy the data from into an Excel worksheet. The code first inserts a row at the bottom of the range and then should move the data from the form to the worksheet, but I am getting an Object Required error when it hits the first .Cells(1,1) statement.
'Save data to Settings worksheet
If Me.optActivePortfolios Then
With .Rows(.Rows.Count + 1).EntireRow.Insert
.Cells(1, 1).Value = Me.txtAddedBy.Value 'You can now refer to cells in the new row as .Cells(1, 1), .Cells(1, 2), etc.
.Cells(1, 2).Value = Me.txtDateAdded.Value
.Cells(1, 3).Value = "Yes"
.Cells(1, 6).Value = Me.txtPortfolioCode.Value
.Cells(1, 7).Value = Me.txtPortfolioName.Value
.Cells(1, 8).Value = Me.txtURLSectorSummary.Value
.Cells(1, 9).Value = Me.txtURLSectorDetail.Value
.Cells(1, 10).Value = Me.txtURLRatingSummary.Value
.Cells(1, 11).Value = Me.txtURLRatingDetail.Value