Results 1 to 4 of 4

Thread: Mousepointer in Excel VBA

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2004
    Posts
    9

    Mousepointer in Excel VBA

    Good Morning

    Shopping for soem help with the mousepointer in VBA for Excel.
    I thought it might work the same as VB 6(Screen.MousePointer = vbHourglass)...

    However, I get an error "Object Required". I don't know how to fix this. Is there a reference I have to add in order to use the MousePointer function?

    Any help is appreciated,
    Thanks EJD

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    I think in VBA it's:

    Application.Mousepointer = ???

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2004
    Posts
    9
    Thanks for replying...I have made a bit of progress.

    I tried using Application.MousePointer in place of the form name...
    OpenForm.MousePointer = fmMousePointerHourGlass. I get an error.

    When using OpenForm., I get a list that has MousePointer in it.
    When I pick MousePointer and type equal, I can pick from a list
    of shapes for the pointer.

    Stepping through the code, OpenForm.Mousepointer is equal to 11(HourGlass value) but no HourGlass when I click on the button.

    EJD

  4. #4
    Addicted Member
    Join Date
    Aug 2002
    Location
    Luton, UK
    Posts
    178
    You have to set Mousepointer for each control so :-

    Code:
    CommandButton1.MousePointer = fmMousePointerHourGlass
    Regards
    BrianB
    -------------------------------

Posting Permissions

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



Click Here to Expand Forum to Full Width