Remove the space from "ADODB. Connection" so that it reads "ADODB.Connection")
Excel VBA Runtime error 429 ActiveX Component can't create object.
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.
11 answers
Sort by: Most helpful
-
-
HansV 462.4K Reputation points MVP Volunteer Moderator2024-04-09T09:34:02+00:00 row.Value is a two-dimensional array. Join works only with one-dimensional arrays.
Try this instead:
values = "'" & Application.TextJoin("','", True, row) & "'" -
HansV 462.4K Reputation points MVP Volunteer Moderator2024-04-09T10:08:41+00:00 OK - TextJoin is not available in Excel 2010.
Replace the values = ... line with
Dim cel As Range For Each cel In Row values = values & "','" & cel.Value Next cel values = Mid(values, 3) & "'"