Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Corrupted ActiveX control? "Can't exit design mode because Control 'DTPicker1" can not be created"

I am developing an Excel VBA application on my desktop machine. I have a DatePicker ActiveX control on my spreadsheet. It was working fine.

Then, while on travel, I was working on the application on a laptop. When I returned, I moved the file back to my desktop machine. Now when I try to run the app, I continually get the error "Can't exit design mode because Control 'DTPicker1" can not be created".

Renaming the control and all its references in the code hasn't helped. When I try to delete the control I still get the message even though there is no longer a control of that name.

How do I fix this?

like image 513
BillD Avatar asked May 17 '14 19:05

BillD


1 Answers

Sounds like something in your workbook got corrupted. Something like this has happened to me once or twice.

The solution is then to copy everything (code and sheet contents) to a new workbook and rebuild your application there.

[Upgraded from comment since this solved the issue.]

like image 127
Jean-François Corbett Avatar answered Sep 18 '22 21:09

Jean-François Corbett