Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default hourglass remains after macro runs???

when i run the following code from the VBE (F5), it runs fine. when i run it
from a rectangle i drew on a spreadsheet in the same file, the hourglass
remains on the screen until the OK button or Close "X" is clicked.

Sub StartupPath()
MsgBox Application.StartupPath, Title:="The Excel startup path is: "
End Sub

what is causing the hourglass to remain after the msgbox is displayed?
thank you.
elizabeth
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default hourglass remains after macro runs???

Hi Elizabeth,

Your code ran without problem for me, irrespective of whether it ran from
the VBE or in response to a shape click event.

Of course, in either case, the macro cannot terminate until the message box
is closed.

---
Regards,
Norman



"Elizabeth" wrote in message
...
when i run the following code from the VBE (F5), it runs fine. when i run
it
from a rectangle i drew on a spreadsheet in the same file, the hourglass
remains on the screen until the OK button or Close "X" is clicked.

Sub StartupPath()
MsgBox Application.StartupPath, Title:="The Excel startup path is: "
End Sub

what is causing the hourglass to remain after the msgbox is displayed?
thank you.
elizabeth



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default hourglass remains after macro runs???

Norman:
Thanks for your reply. I should mention (although it's probably obvious)
that I am new to VBA.
When you say it "ran without a problem", do you mean the hourglass did not
remain on the screen when you ran the macro from a shape on a worksheet?
When I run the macro from the VBE or from a toolbar button, the hourglass
does not remain on the screen while waiting for me to click OK or "X". It's
only when I run the macro from a shape on a worksheet that the hourglass
remains. A tester (I'm writing procedures) thought they should wait before
clicking OK because the macro was still working & going to display something
else.
Thoughts?
Thank you.
Elizabeth

"Norman Jones" wrote:

Hi Elizabeth,

Your code ran without problem for me, irrespective of whether it ran from
the VBE or in response to a shape click event.

Of course, in either case, the macro cannot terminate until the message box
is closed.

---
Regards,
Norman

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default hourglass remains after macro runs???

Hi Elizabeth,

Running your procedure from Excel (either via Alt-F8 or from a rectangle,
to simulate your scenario), I get the hourglass, indicating that the macro
is waiting for user response. Running the macro manually from the VBE, I get
the arrow cursor.

If you find this disconcerting, you could specify the cursor form.

I guess that, in analagous situations, the curssor form has never adversely
impinged for me.


---
Regards,
Norman



"Elizabeth" wrote in message
...
Norman:
Thanks for your reply. I should mention (although it's probably obvious)
that I am new to VBA.
When you say it "ran without a problem", do you mean the hourglass did not
remain on the screen when you ran the macro from a shape on a worksheet?
When I run the macro from the VBE or from a toolbar button, the hourglass
does not remain on the screen while waiting for me to click OK or "X".
It's
only when I run the macro from a shape on a worksheet that the hourglass
remains. A tester (I'm writing procedures) thought they should wait
before
clicking OK because the macro was still working & going to display
something
else.
Thoughts?
Thank you.
Elizabeth

"Norman Jones" wrote:

Hi Elizabeth,

Your code ran without problem for me, irrespective of whether it ran from
the VBE or in response to a shape click event.

Of course, in either case, the macro cannot terminate until the message
box
is closed.

---
Regards,
Norman



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default hourglass remains after macro runs???

Norman,

I once had a user sit and start at a Msgbox waiting for the hourglass to stop.
Ever since then, I change the cursor to the default before showing a Msgbox...
Elizabeth could change her code to...

Sub StartupPath()
Application.Cursor = xlDefault
MsgBox Application.StartupPath, Title:="The Excel startup path is: "
End Sub

Jim Cone
San Francisco, USA


"Norman Jones"

wrote in message
...

Hi Elizabeth,
Running your procedure from Excel (either via Alt-F8 or from a rectangle,
to simulate your scenario), I get the hourglass, indicating that the macro
is waiting for user response. Running the macro manually from the VBE, I get
the arrow cursor.
If you find this disconcerting, you could specify the cursor form.
I guess that, in analagous situations, the curssor form has never adversely
impinged for me.---
Regards,
Norman




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default hourglass remains after macro runs???

Norman:
THANK YOU!!!
I thought my problem was the macro was in some kind of inefficient loop. It
never occured to me that it was just the cursor's appearance, or even that
the cursor's appearance can be changed. I added "Application.Cursor =
xlNorthwestArrow" before, & "Application.Cursor = xlDefault" after the msgbox
line & it now works flawlessly. Thanks again!
Elizabeth

"Norman Jones" wrote:

Hi Elizabeth,

Running your procedure from Excel (either via Alt-F8 or from a rectangle,
to simulate your scenario), I get the hourglass, indicating that the macro
is waiting for user response. Running the macro manually from the VBE, I get
the arrow cursor.

If you find this disconcerting, you could specify the cursor form.

I guess that, in analagous situations, the curssor form has never adversely
impinged for me.


---
Regards,
Norman

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default hourglass remains after macro runs???

Hi Jim.

I do not in any way dispute the possibility, and, after sending my reponse
to Elizabeth, it occurred to me that, over and above indivcating that the
cursor could be changed, I should have provided the requisite code.

I think that, in future, I too will proactively set the cursor.

However, in the light of your story, would you allow me to retain the
hourglass for *certain* users?


---
Regards,
Norman



"Jim Cone" wrote in message
...
Norman,

I once had a user sit and start at a Msgbox waiting for the hourglass to
stop.
Ever since then, I change the cursor to the default before showing a
Msgbox...
Elizabeth could change her code to...

Sub StartupPath()
Application.Cursor = xlDefault
MsgBox Application.StartupPath, Title:="The Excel startup path is: "
End Sub

Jim Cone
San Francisco, USA


"Norman Jones"

wrote in message
...

Hi Elizabeth,
Running your procedure from Excel (either via Alt-F8 or from a
rectangle,
to simulate your scenario), I get the hourglass, indicating that the macro
is waiting for user response. Running the macro manually from the VBE, I
get
the arrow cursor.
If you find this disconcerting, you could specify the cursor form.
I guess that, in analagous situations, the curssor form has never
adversely
impinged for me.---
Regards,
Norman




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default hourglass remains after macro runs???

Hi Elizabeth,

If you look at the exchange between Jim amd me, you will see that, as result
of your posts and Jim's experience, I have decided to change the cursor in
such situations.

Jim has provided appopriate code to achieve this.

If there are any residual problems, please post back.

---
Regards,
Norman



"Elizabeth" wrote in message
...
Norman:
THANK YOU!!!
I thought my problem was the macro was in some kind of inefficient loop.
It
never occured to me that it was just the cursor's appearance, or even that
the cursor's appearance can be changed. I added "Application.Cursor =
xlNorthwestArrow" before, & "Application.Cursor = xlDefault" after the
msgbox
line & it now works flawlessly. Thanks again!
Elizabeth

"Norman Jones" wrote:

Hi Elizabeth,

Running your procedure from Excel (either via Alt-F8 or from a
rectangle,
to simulate your scenario), I get the hourglass, indicating that the
macro
is waiting for user response. Running the macro manually from the VBE, I
get
the arrow cursor.

If you find this disconcerting, you could specify the cursor form.

I guess that, in analagous situations, the curssor form has never
adversely
impinged for me.


---
Regards,
Norman



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default hourglass remains after macro runs???

Jim:
Thank you for your response. I like your version better than mine - 1 less
line of code.
After Norman suggested changing the cursor form, I looked "cursor" up in VBE
Help. From the choices, I selected the xlNorthwestArrow since the tester & I
were expecting to see an arrow instead of an hourglass. I then reset the
cursor to the default since VBE Help said to do so.
What I haven't been able to figure out (after researching VBE Help, Google,
the Microsoft website, & my 3 ref books) is the following:
1) What does the "default" cursor mean? I can't find an option in Excel to
change the appearance of the cursor. Is it referring to the user's selection
in Control Panel | ... | Mouse | Pointers tab | Customize?
2) If that is the case, why does "Application.Cursor" work in an Excel macro
when Application (per VBE Help) refers to the Excel application, but the
Control Panel isn't the Excel application? Have I totally misunderstood VBA
basics?
Thank you for any clarification you can provide.
Elizabeth


"Jim Cone" wrote:

Norman,

I once had a user sit and start at a Msgbox waiting for the hourglass to stop.
Ever since then, I change the cursor to the default before showing a Msgbox...
Elizabeth could change her code to...

Sub StartupPath()
Application.Cursor = xlDefault
MsgBox Application.StartupPath, Title:="The Excel startup path is: "
End Sub

Jim Cone
San Francisco, USA


"Norman Jones"

wrote in message
...

Hi Elizabeth,
Running your procedure from Excel (either via Alt-F8 or from a rectangle,
to simulate your scenario), I get the hourglass, indicating that the macro
is waiting for user response. Running the macro manually from the VBE, I get
the arrow cursor.
If you find this disconcerting, you could specify the cursor form.
I guess that, in analagous situations, the curssor form has never adversely
impinged for me.---
Regards,
Norman



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default hourglass remains after macro runs???

Elizabeth,

I have never been much concerned with windows vs. application
cursor differences.
However, I changed the default cursor using Control panel and
discovered that Excel still used its own cursors for the spreadsheet,
but that the new cursor was used for the area immediately outside of
the spreadsheet area.
That makes sense to me, as being able to change the cursors
used on the spreadsheet could only lead to much user confusion.

When using a Userform, or an active x control, Excel offers a wider
selection of cursors to choose from.

Regards,
Jim Cone
San Francisco, USA


"Elizabeth" wrote in message
...
Jim:
Thank you for your response. I like your version better than mine - 1 less
line of code.
After Norman suggested changing the cursor form, I looked "cursor" up in VBE
Help. From the choices, I selected the xlNorthwestArrow since the tester & I
were expecting to see an arrow instead of an hourglass. I then reset the
cursor to the default since VBE Help said to do so.
What I haven't been able to figure out (after researching VBE Help, Google,
the Microsoft website, & my 3 ref books) is the following:
1) What does the "default" cursor mean? I can't find an option in Excel to
change the appearance of the cursor. Is it referring to the user's selection
in Control Panel | ... | Mouse | Pointers tab | Customize?
2) If that is the case, why does "Application.Cursor" work in an Excel macro
when Application (per VBE Help) refers to the Excel application, but the
Control Panel isn't the Excel application? Have I totally misunderstood VBA
basics?
Thank you for any clarification you can provide.
Elizabeth


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
VBA macro runs fine, but freezes if I try to do ANYTHING else whileit runs Rruffpaw Setting up and Configuration of Excel 1 September 17th 11 01:25 PM
One macro runs then it auto runs another macro PG Excel Discussion (Misc queries) 2 September 1st 06 09:30 PM
Which Macro Runs...? Bill Martin Excel Discussion (Misc queries) 7 September 29th 05 12:42 PM
Code & modules are gone, Macro warning message remains David McRitchie Excel Programming 1 September 10th 04 11:17 PM
Macro - square remains on screen Jim[_25_] Excel Programming 4 September 17th 03 08:07 PM


All times are GMT +1. The time now is 02:01 PM.

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

About Us

"It's about Microsoft Excel"