Enabled = True property on form not working

The VBA forum deals with IntelliCAD 2000 VBA (Visual Basic for Applications) issues.

Moderator: CMS Inc

Post Reply
Posts: 4
Joined: Mon Apr 26, 2004 11:01 pm

Enabled = True property on form not working

Post by kenn » Mon May 17, 2004 11:45 am

I have a procedure that sets the Enabled property of a form to False when starting and True when finished, to prevent the user from clicking other buttons. However, it seems the Enabled property isn't being set to True when the procedure ends.

I can duplicate the problem by creating a simple form with one checkbox. The code for clicking the checkbox is:

Private Sub chkToggle_Click()
Me.Enabled = False
Me.Enabled = True
End Sub

The form ends up being disabled (not clickable) after the first click. The same code in AutoCAD 2000 VBA works with no problems.

If I set a breakpoint at the Me.Enabled = True line, and then press F8 once when it gets there, the form ends up being enabled. However, adding a timed For/Next loop and DoEvents doesn't seem to help, however.

Does anyone have any suggestions on how to get it to work? I'm using IntelliCAD


Post Reply