Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Disabling automatic hourglass cursor whilst VB Code running

I have been experimenting with Application.Ontime to run a Sub Routine once
per second (or whatever time interval) to update a Graph.
Using Application.ScreenUpdating = False in the Sub Routine to minimise
flicker.
Every second, as Sub Routine runs the Cursor changes from whatever it was
(crosshair, arrow, I beam etc) to Hourglass for a split second.
Any suggestions how this cursor feature be disabled in the Sub Routine or
via some other setting option ?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Disabling automatic hourglass cursor whilst VB Code running

At the start and end of your refresh routine try:-

Application.Cursor = xlNorthwestArrow

Your routine

Application.Cursor = xlNormal


Mike

"David Messenger" wrote:

I have been experimenting with Application.Ontime to run a Sub Routine once
per second (or whatever time interval) to update a Graph.
Using Application.ScreenUpdating = False in the Sub Routine to minimise
flicker.
Every second, as Sub Routine runs the Cursor changes from whatever it was
(crosshair, arrow, I beam etc) to Hourglass for a split second.
Any suggestions how this cursor feature be disabled in the Sub Routine or
via some other setting option ?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Disabling automatic hourglass cursor whilst VB Code running

Thanks for this but I have tried using the Application.Cursor in the sub
routine.

Despite putting it in Code still see a visible change. Trying to hide this
entirely from the user.

Its a minor irritation but I was taking it as a challenge to eliminate.

Issues are :

(a) The cursor may be the northwest arrow, or the I beam, or cross hairs
whilst the user is working on the sheet. So in the background every second or
so when the Sub Routine kicks in they "see" the cursor flick to the hourglass
and then back again. My only guess I would have to make the Sub Routine
"remember" what the cursor type was when/prior to the Sub Routine being
called and try to force it to stay at that.

(b) I am not sure whether the hourglass is coming up because of the Sub
Routine or because of Excel updating the graph (after the Sub Routine is
finished). ie if I tell the Cursor to go back to Normal at the end of the Sub
Routine it may be irrelevant because it is changed outside the Sub Routine as
the graph updates?

Thanks again.

"Mike H" wrote:

At the start and end of your refresh routine try:-

Application.Cursor = xlNorthwestArrow

Your routine

Application.Cursor = xlNormal


Mike

"David Messenger" wrote:

I have been experimenting with Application.Ontime to run a Sub Routine once
per second (or whatever time interval) to update a Graph.
Using Application.ScreenUpdating = False in the Sub Routine to minimise
flicker.
Every second, as Sub Routine runs the Cursor changes from whatever it was
(crosshair, arrow, I beam etc) to Hourglass for a split second.
Any suggestions how this cursor feature be disabled in the Sub Routine or
via some other setting option ?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Disabling automatic hourglass cursor whilst VB Code running

I changed it to

Application.Cursor = xlNormal

Your routine

Application.Cursor = xlNormal

works this way except that when you move the cursor or a command button it
changes to the hour glass and stays that way.


David Messenger wrote:
Thanks for this but I have tried using the Application.Cursor in the sub
routine.

Despite putting it in Code still see a visible change. Trying to hide this
entirely from the user.

Its a minor irritation but I was taking it as a challenge to eliminate.

Issues are :

(a) The cursor may be the northwest arrow, or the I beam, or cross hairs
whilst the user is working on the sheet. So in the background every second or
so when the Sub Routine kicks in they "see" the cursor flick to the hourglass
and then back again. My only guess I would have to make the Sub Routine
"remember" what the cursor type was when/prior to the Sub Routine being
called and try to force it to stay at that.

(b) I am not sure whether the hourglass is coming up because of the Sub
Routine or because of Excel updating the graph (after the Sub Routine is
finished). ie if I tell the Cursor to go back to Normal at the end of the Sub
Routine it may be irrelevant because it is changed outside the Sub Routine as
the graph updates?

Thanks again.

At the start and end of your refresh routine try:-

[quoted text clipped - 16 lines]

Thanks


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200706/1

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Form whilst Macro is Running DAV135 Excel Programming 1 August 3rd 06 02:36 PM
Stopping Code from Running whilst in Loop... Chris Gorham Excel Programming 2 November 21st 05 07:27 AM
How do I pause a Macro whilst it is running? Gary[_20_] Excel Programming 4 August 26th 04 01:08 AM
How to Mute/Enable Windows Sounds whilst running VBA code Hotbird[_3_] Excel Programming 0 July 29th 04 04:43 PM
How to Mute/Enable Windows Sounds whilst running VBA code Hotbird[_3_] Excel Programming 0 July 20th 04 09:34 PM


All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"