PDA

View Full Version : Solved: Mousemove event with shape



slamet Harto
05-27-2008, 08:50 PM
Dear All,

Please advise me on how to use mousemove event with shape.
I use the following code but seem's synthax error.

any reply or sugestion would be higly appreaciate it,
Rgds, hartoSub Macro1()
ActiveSheet.Shapes("MyShape")_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Sheets(1).Unprotect "1234"

End Sub

mikerickson
05-27-2008, 08:53 PM
Shapes don't have events.

benny
05-28-2008, 03:58 AM
Hi.

Give this a try.


Option Explicit
Sub Test() 'attach this macro to your Shape
Dim btn As Object

Set btn = ActiveSheet.Shapes(Application.Caller)
ActiveSheet.Unprotect "1234"
End Sub

slamet Harto
05-30-2008, 04:02 AM
Thanks All, highly appreciate it .

Rgds, Harto