How to remove border around the button after pressed. (1 Viewer)

tihmir

Registered User.
Local time
Today, 06:18
Joined
May 1, 2018
Messages
257
Happy New Year to all!
I wish you all happiness and health!
How can I remove that border, which remains around the button is pressed?

border_Button.png
 

Eugene-LS

Registered User.
Local time
Today, 16:18
Joined
Dec 7, 2018
Messages
481
How can I remove that border, which remains around the button is pressed?
Try to set focus to enother control of form
Code:
Private Sub cmdButton_Click()
    ' ...
    ' ...
    Me.EnotherControl.SetFocus
End Sub
 

tihmir

Registered User.
Local time
Today, 06:18
Joined
May 1, 2018
Messages
257
Try to set focus to enother control of form
Code:
Private Sub cmdButton_Click()
    ' ...
    ' ...
    Me.EnotherControl.SetFocus
End Sub
Yes, that is a possible option, but it is quite laborious to do for all buttons!
Тhank you for the advice!
 
Last edited:

Eugene-LS

Registered User.
Local time
Today, 16:18
Joined
Dec 7, 2018
Messages
481
How can I remove that border, which remains around the button is pressed?
Another way:
Use a Label control instead of a button, it also has an "On Click" event.
Code:
Private Sub LabelTest_Click()
    MsgBox "There's no border around the Lable!", _
        vbInformation, "Use a label instead of a button!"
End Sub
 

Users who are viewing this thread

Top Bottom