PC Review


Reply
Thread Tools Rate Thread

Disabling automatic hourglass cursor whilst VB Code running

 
 
=?Utf-8?B?RGF2aWQgTWVzc2VuZ2Vy?=
Guest
Posts: n/a
 
      5th Jun 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWlrZSBI?=
Guest
Posts: n/a
 
      5th Jun 2007
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
>

 
Reply With Quote
 
=?Utf-8?B?RGF2aWQgTWVzc2VuZ2Vy?=
Guest
Posts: n/a
 
      5th Jun 2007
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
> >

 
Reply With Quote
 
blackbox via OfficeKB.com
Guest
Posts: n/a
 
      5th Jun 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Showing a form whilst code is running... Bob Quintal Microsoft Access Form Coding 1 19th Aug 2007 12:52 PM
Stopping Code from Running whilst in Loop... =?Utf-8?B?Q2hyaXMgR29yaGFt?= Microsoft Excel Programming 2 21st Nov 2005 07:27 AM
How to Mute/Enable Windows Sounds whilst running VBA code Hotbird Microsoft Excel Misc 2 16th Aug 2004 04:20 AM
How to Mute/Enable Windows Sounds whilst running VBA code Hotbird Microsoft Excel Programming 0 29th Jul 2004 04:43 PM
How to Mute/Enable Windows Sounds whilst running VBA code Hotbird Microsoft Excel Programming 0 20th Jul 2004 09:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:07 AM.