PDA

View Full Version : Run-time error '429': ActiveX component can't create object



paddysheeran
06-12-2014, 05:01 AM
Hi All,

I have just come upon this error message recently. Previously the code below worked with no issues but only today I'm starting to receive the message when running the process:


Thisworkbook.Path

I've tried this in other workbooks and had no issues. Any ideas?

thanks,

Paddy.

Aflatoon
06-12-2014, 05:13 AM
Do you have some other object named Thisworkbook in your code? The VBE should have changed that to ThisWorkbook otherwise.

paddysheeran
06-12-2014, 05:36 AM
sorry no the full code is:


ChDir ThisWorkbook.Path

but even entering ?ThisWorkbook.Path in the immediate window results in the same error.

westconn1
06-12-2014, 06:20 AM
what is the path of the workbook object?
is it a folder you need elevation to access?

paddysheeran
06-12-2014, 06:45 AM
Hi, no elevation is needed. its like:

C:\Users\EmployeeID\Documents\Reports\New Template

It was working fine a few days ago. When I use ActiveWorkbook.path I have no issues just ThisWorkbook.path

I have just tried ?ThisWorkbook.Name in the Immediate window and get the same error so its something to do with ThisWorkbook

this is specific to one workbook. I've opened an older version which doesn't not have the same issue.

Aflatoon
06-12-2014, 07:22 AM
Can you remove all data from the workbook and post it?

Jan Karel Pieterse
06-12-2014, 09:43 AM
Look in Tools, Refences. There is probably one there that is marked "MISSING".

snb
06-12-2014, 12:33 PM
If the workbook hasn't been saved yet
chdir thisworkbook.path will error out.

If the attribute of the folder has been changed (system/hidden/read only) it might cause some trouble too.