Userform_MouseMove() Help

SMit07

New Member
Joined
Feb 23, 2020
Messages
5
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi all,

I'm trying to make a userform with a multipage, and 3 buttons in each page. I'm trying to make it when the mouse is moved over a button, it hides revealing a new button underneath etc (see images).
Annotation 2020-09-04 112822.jpg
Annotation 2020-09-04 112823.jpg


I cannot however get the buttons to 'unhighlight' upon moving the mouse away.
I'm not entirely sure why, but the following code does not work:
VBA Code:
Sub Userform_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
'PURPOSE: Reset Userform buttons to Inactive Status

Begin_Button_1_Inactive.Visible = True
About_Button_1_Inactive.Visible = True
Cancel_Button_1_Inactive.Visible = True

End Sub

The error comes from the 'Sub Userform_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)'
I've also tried replacing the 'Userform' part with 'Page', 'Multipage1' etc and am now fresh out of ideas.

Any help would be greatly appreciated thanks :)
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Watch MrExcel Video

Forum statistics

Threads
1,127,652
Messages
5,626,091
Members
416,161
Latest member
David1966Lewis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top