Thanks, that's an ingenious solution! One tip: if your buttons are inside a frame, they will spazz out with this method. My solution was to call the MouseMove method on the frame and set the regular button to visible and the hover button to invisible there also.
Well detailed thanks for the video, I'm trying to do serial port readings with vba, you know to capture data from an electronic scale, e found something on GitHub but for old versions, if you get to know something I appreciate you realozes a video , I will be.
The background color of the button could easily be changed like this... *Dim btnInitColor, btnHoverColor As Long* *Private Sub UserForm_Activate()* *btnInitColor = CommandButton1.BackColor* *btnHoverColor = RGB(0, 255, 0) 'Green* *End Sub* *Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)* *'change background color of the button when mouse moves over it* *CommandButton1.BackColor = btnHoverColor* *End Sub* *Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)* *'reset background color of the button when mouse moves off of it* *CommandButton1.BackColor = btnInitColor* *End Sub*
Thanks for watching and sharing your code. Yes, that is, of course, possible. However, it can quickly become quite messy when you have multiple command buttons, especially if you want to apply a hover effect to all of them. Cheers, Sven ✌️
Thanks, that's an ingenious solution! One tip: if your buttons are inside a frame, they will spazz out with this method. My solution was to call the MouseMove method on the frame and set the regular button to visible and the hover button to invisible there also.
Great tip! Thanks for sharing! -Sven ✌️
This is great and easy to understand! Thank you
Glad you liked it, Florian! Cheers, Sven ✌️
Thank you 🙏 it is clearly to understand !
My pleasure! Appreciate you taking the time to watch and leave a comment. Cheers, Sven ✌️
kindly share more technical content related to VBA
Well noted! Thanks for watching! Cheers, Sven ✌️
Well detailed thanks for the video, I'm trying to do serial port readings with vba, you know to capture data from an electronic scale, e found something on GitHub but for old versions, if you get to know something I appreciate you realozes a video , I will be.
Thanks for watching and your video suggestion. Cheers, Sven ✌️
Pls make video on streamlit modals
Thank you for watching the video & your suggestion. Cheers, Sven ✌️
The background color of the button could easily be changed like this...
*Dim btnInitColor, btnHoverColor As Long*
*Private Sub UserForm_Activate()*
*btnInitColor = CommandButton1.BackColor*
*btnHoverColor = RGB(0, 255, 0) 'Green*
*End Sub*
*Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)*
*'change background color of the button when mouse moves over it*
*CommandButton1.BackColor = btnHoverColor*
*End Sub*
*Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)*
*'reset background color of the button when mouse moves off of it*
*CommandButton1.BackColor = btnInitColor*
*End Sub*
Thanks for watching and sharing your code. Yes, that is, of course, possible. However, it can quickly become quite messy when you have multiple command buttons, especially if you want to apply a hover effect to all of them. Cheers, Sven ✌️
I have already done this with single class module
That's great! 👍