Excel VBA Runtime error 429 ActiveX Component can't create object.

Anonymous
2024-04-07T11:11:52+00:00

Split from this thread.

i) i changed the code in my VBA Code as per comments,

It is working fine & select Empty cell also and I change the code for add new column as per below , it is working

Set rng = ws. Range("A2:AA" & lastRow)

ii) But I copy the full code & run , the error has come

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

11 answers

Sort by: Most helpful
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2024-04-09T13:53:05+00:00

    Your SQL statement will only work if your range has exactly as many cells as the table Test_1 has fields. Otherwise, you have to specify the field names too.

    And if ALL fields are text fields.

    0 comments No comments