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
kenn
Newbie
Posts: 4
Joined: Mon Apr 26, 2004 11:01 pm
Contact:

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 4.0.27.1.

Thanks...

Kenn
Post Reply