Button Enabled = false and I can press

Don’t know why, even the ButtonAdd.Enabled = False, I can press it.

I’m using mouse down

You should use the Pressed-Event, not MouseDown.

4 Likes

If you want to use MouseDown for some reason instead of Pressed event, then you will need to wrap your code like:

If Me.Enabled Then
  //your code
End If
1 Like

MouseDown is the “I may try to press the button but I’m not yet committed to it” action so the user wouldn’t expect anything drastic to happen at this stage. Only the MouseUp action seals it and there is the Pressed event to handle actual completed button presses. This is the event you should use.

2 Likes