简体   繁体   中英

ActiveX component can't create object - 429

I have the following code and I am getting the below error. I am not sure what changed but this was working fine before a remote system upgrade. Below is the code. Can you someone help with a fix.

Sub Import()

Dim RW1 As Worksheet
Set RW1 = Thisworkbook.Sheets("T_M") - this is where error occurs.

End Sub

Error - ActiveX component can't create object

Your code and issue don't make sense to me, your Sub routine doesn't have a name or and End . It should look something like this:

Sub MySubname()

  Dim RW1 As Worksheet
  Set RW1 = ThisWorkbook.Sheets("T_M") ' this is where error occurs.

End Sub

The error you're getting doesn't match the code either, if you have a sheet called "T_M" this will work fine. If you don't then you'd get a subscript error. If you have a sheet that isn't a worksheet, you'd get a type mismatch error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM