Forum Discussion
ryanbarton324
Apr 26, 2021Copper Contributor
Running VBA code after clicking on a UserForm 'image'
Hello, I am currently trying to write some VBA code that will initialize once I left click on a UserForm image I have uploaded. In my specific situation, I am using a hovering effect for a 'Login...
- Apr 28, 2021
There is a textbox named TextBox1 on top of the Password text box.
So you actually enter the password in TextBox1, and the Password text box remains empty. Hence the message that the login information is incorrect.
HansVogelaar
Apr 26, 2021MVP
Added later: the Image control actually does have a Click event, but it is hidden. See the replies by JonPeltier below.
The Image control does not have a click event. you can use the MouseUp (or MouseDown) event instead, with syntax
Private Sub Image1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
' your code here
End Sub
with the name of your control instead of Image1, of course.