PDA

Click to See Complete Forum and Search --> : Mousepointer in Excel VBA


mred2nice
Jul 19th, 2004, 08:16 AM
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

si_the_geek
Jul 19th, 2004, 08:41 AM
I think in VBA it's:

Application.Mousepointer = ???

mred2nice
Jul 19th, 2004, 08:50 AM
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

BrianB
Jul 20th, 2004, 02:47 AM
You have to set Mousepointer for each control so :-


CommandButton1.MousePointer = fmMousePointerHourGlass