Cannot Exit Design Mode Error

bisel

Board Regular
Joined
Jan 4, 2010
Messages
233
Office Version
  1. 365
Platform
  1. Windows
Greetings All,

I have strange situation and hoping I might get some assistance.

I have a workbook with considerable VBA macros and several user forms. I am at a point where I want to add another user form to allow the end user to make a model change.

Here is a screen print of what I am starting with ... This is the userform I have created ...

userform.jpg


I now will merely add either a combo box or a list box ... like this ...

userform.jpg


I enter appropriate named range for "control source" and "row source"

I test out the function of the user form and it works as I would expect. All my other macros seem to be working as well. I then same my work. But, now when I attempt to open the workbook, I get this error ...

error.jpg


To add to my confusion, although I had button called "col_width_button", it is long gone and associated macro or code is deleted. I have attempted to highlight the project in the VBA editor and then click Debug, Compile VBA and in the good version (have not yet added a combo box or list box to the user form), it seems to compile fine.

Does anyone have any idea why upon adding a list box or combo box to the user form that I am getting this issue?

Thanks,

Steve
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Have you checked ALL of your codes to make sure there isn't a rogue reference in one of them to the "col_width_button"
 
Upvote 0
Have you checked ALL of your codes to make sure there isn't a rogue reference in one of them to the "col_width_button"
I have checked before and going on a chance, I checked again. I checked every sheet and every user form ... no occurrence of a any object with that name. I checked every module and no occurrence of any macro referencing that name.

By chance, I decided to create a command button with that name. I saved my work and upon opening again, everything worked fine. I then deleted the command button and recreated a list box as before. Saved my work and upon opening again I got this error ...

error.jpg


Same error different "button" name. This button does indeed exist, and it works fine in prior version of the workbook.

This error I am getting seems to associate itself with a combo box or a list box in the user form.

Steve
 
Upvote 0
Further information ...

I cannot add a list box or a combo box to the user form. I can, however, add an Active-X control list box or combo box to the sheet itself and it seems to function as it should and after saving my work, there are no errors upon reopening the file. This error I am experiencing seems to be associated only with the user form.

I tried renaming the user form ... nope, that is not it. I tried renaming the row source and control source range names ... nope, that does not make any difference. Tried defining the cells as General, a number, text, etc. Nothing works.
 
Upvote 0
If it happens when you open the workbook, it seems it is in the workbook_open event, calling something that isn't available.
Are you able to upload the file to a hosting site or similar, then post a link to the file back here....for users to take a look at the whole file ??
 
Upvote 0
A quick update on this issue.

I created a new user form with a different name. Added a list box same as before and saved my work. It works fine. Very strange.

Steve
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,152
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top