Consulting

Results 1 to 4 of 4

Thread: Solved: Mousemove event with shape

  1. #1
    VBAX Tutor
    Joined
    Sep 2007
    Posts
    265
    Location

    Solved: Mousemove event with shape

    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, harto[VBA]Sub 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[/VBA]

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    Shapes don't have events.

  3. #3
    VBAX Regular
    Joined
    Oct 2005
    Posts
    26
    Location
    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

  4. #4
    VBAX Tutor
    Joined
    Sep 2007
    Posts
    265
    Location
    Thanks All, highly appreciate it .

    Rgds, Harto

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •