(Solved) – vba filling table range error Invalid procedure call or argument

(solved)-–-vba-filling-table-range-error-invalid-procedure-call-or-argument

On sheet ‘Work’ I have a table:

Set tbl = Work.ListObjects("CaseData")
lastWork = tbl.Range.Rows.Count

Now I am trying to fill a range within the table. I am able to do that without referring to the table this way:

Work.Range("A2:A" & lastWork) = 10

However, the following does not work:

tbl.Range("A2:A" & lastWork).Value = 10

I am getting an error: Invalid procedure call or argument.
How would I fill a column within a table?
And is it possible to do that referring to the column name?

Leave a Reply

Your email address will not be published. Required fields are marked *