bnageshrao
Programmer
I put a command button on the spreadsheet and wrote the fPrivate
Sub cmdPress_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
cmdPress.Move _
Rnd * (ScaleWidth - cmdPress.Width), _
Rnd * (ScaleHeight - cmdPress.Height)
End Subollowing code
When I click on the button I get Run time error 438 - Object doesnot support this method or property. Same code works fine in Regular VB. What should be done to make it work in VBA.
Sub cmdPress_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
cmdPress.Move _
Rnd * (ScaleWidth - cmdPress.Width), _
Rnd * (ScaleHeight - cmdPress.Height)
End Subollowing code
When I click on the button I get Run time error 438 - Object doesnot support this method or property. Same code works fine in Regular VB. What should be done to make it work in VBA.