Cursor remains as a hourglass after the macro has run

Darril

New Member
Joined
Nov 15, 2005
Messages
10
Clicking a command button causes a macro to run.
Once the macro has completed, my cursor remains as a hourglass whilst still positioned over the button. If I move the cursor off the Button, it reverts to its default shape. I want the hourglass cursor to change after the macro has completed without having to move the mouse.

I inserted the following code at the end of the macro:

Application.Cursor = xlDefault

but this did not make a difference. With the cursor as an hourglass, the user thinks the macro is still running.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
What's csusing the cursor to change into an hourglass? Would selecting a cell in your code solve your problem?
 
Upvote 0
Hi Andrew
Its a macro that cals other macros and runs through its own code.
Selecting another cell in the macro does not solve the problem bacause the cursor stays where it is ie the cursor depressed the button and turns to a hourglass whilst the macro runs but it stays as a hourglass after the macro has finished. If I move the mouse, the cursor changes back to its default shape - nothing in the code makes the cursor change to an hourglass.
Ta
 
Upvote 0
Hi Andrew
I could send you the spreadsheet but that would not be fair to you - I could also cut and paste the code here but that may not help as there are associated routines that I call - the problem is that I am getting this on two different buttons but I do not get it when the code is much simpler where other routines are not called.

I also use application.screenupdating = false or true and maybe that is the problemit is sticking on that?
Part of the routing uses the Worksheet_Change() utility and this may also be preventing the cursor changing back from a hourglass
Thanks
 
Upvote 0
Hi Erik
Moving it off the button changes to normal and the hourglass does not reappear if I move the cursor over the button again
Thanks
 
Upvote 0
what do you get when doing a search in your projectcode for
"mousepointer" or "hourglass"
is there any LostFocus code in the commandbuttoncode ?
or other suspicious code ?

feel free to send your workbook if this reply is not solving anything

EDIT: didn't see Andrews reply asking about the same
 
Upvote 0
Hi Erik
I can send you the spreadsheet no problem - except that I dont know how to post the worksheet.
I have no lostfocus code and I do nothing with the mouse cursors
Thanks
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,142
Members
448,551
Latest member
Sienna de Souza

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top