Thread: Mouse pointer
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default Mouse pointer

I made up a test to change mouse pointer to an hour glass, and changed
sheets, the mouse did not change by switching sheets.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
If Application.Cursor = xlDefault Then
Application.Cursor = xlWait
Else
Application.Cursor = xlDefault 'return normal pointer
End If
End Sub

If you are running a macro, I don't see how the user can do anything
in the meantime. Are you running another macro after a time interval.
Also is it really necessary to switch sheets in your macro.
--
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Simon Lloyd " wrote in message ...
Guys, thanks for your responses.......i do understand that an hour glass
is the accepted way but my problem is this.......while updating all 20
sheets the mouse pointer flickers and just before it changes sheet to
update the next the mousepointer stops being an hourglass and becomes a
pointer again for about 10secs allowing the user to select cells or god
forbid click cancel or exit during the autoclose (for some reason if
you select another application or say taskbar, then it interrupts the
macro and it ends prematurely!).

This is why i want to hide the mouse button!.....but if you have
another solution im willing to give it a go!

Simon


---
Message posted from http://www.ExcelForum.com/