Can't Exit Design Mode because Control can not be Created

M

MT DOJ Help Desk

I have a simple spreadsheet that contains a number of check boxes. When I
open the file, I get the following message:

Microsoft Visual Basic
Can't exit design mode because Control "AfterCheckingValidations"
can not be created.

I had a control by that name, but I deleted it and I still get the error.
There are no conflicting names (i.e. A control with the same name as a
variable). There are no controls by that name in any of the other open
projects. Below are the only 4 sections of code that contain a name even
close to the control name given by the error message (Lines beginning with *
are for your reference, and are not actually a part of the code).

Dim cbValue As Boolean

* This is the click event of a "Check All" button on the sheet.
Private Sub cmdCheckCategoryAfter_Click()
cbValue = True
AfterCheckingValidationsTasks
End Sub

* This is the click event of a "Clear All" button on the sheet.
Private Sub cmdClearCategoryAfter_Click()
cbValue = False
AfterCheckingValidationsTasks
End Sub

* This routine is called by the click events of two buttons on the sheet.
Private Sub AllTasks()
MTRecordsTasks
NCICRecordsTasks
PrintLabelsTasks
CertDocsTasks
AfterCheckingValidationsTasks
StuffEnvelopesTasks
MailingValidationsTasks
End Sub

* This routine checks or clears the check box, depending on the state of
cbValue, which is set above depending on the button clicked.
Private Sub AfterCheckingValidationsTasks()
TrashOldCertDocs.Value = cbValue
End Sub

FYI: The last routine will eventually have more check boxes, which is what
makes the Check All and Clear All buttons advantageous to have.

Any ideas as to what is causing this error, and how to fix it?

--Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top