ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   position mouse cursor in msg box (https://www.excelbanter.com/excel-programming/311233-position-mouse-cursor-msg-box.html)

swatsp0p[_2_]

position mouse cursor in msg box
 
Well, I thought I had seen it. Trying to automate so even the most novice
user can operate, I wrote a macro that does extensive reformatting of
imported data. I even turn off screen updating whilst it is running. When
it is finished, a message box opens, saying "Formatting Finished. Click OK".
Self explanatory, right? Wrong. Because the macro is suspending awaiting
the "click", the mouse arrow turns to an hourglass.... so the operator says
to me (after waiting I don't know how long), "But it's not done, there's
still an hourglass!".

So, is there a way to have the mouse automatically positioned 'within' the
message box-so the hourglass returns to an arrow? I know the mouse setup in
control panel can make this a default Windows feature (Snap To), but I don't
control the users of this app's pc.

Any ideas would be appreciated. Good luck!

TIA

swatsp0p
--
The older I get, the better I used to be.

Doug Glancy

position mouse cursor in msg box
 
For some reason, in XL 03 I'm not getting the hourglass as you describe
although i've certainly seen it before. So the below is just an untested
idea. I'm not certain about the dim statement especially. But it seems you
could force the cursor to the arrow (or maybe xlDefault would be better) and
then set it back after they click the msgbox.

Sub test()

Dim cursor As Integer
cursor_setting = Application.cursor
Application.cursor = xlNorthwestArrow
MsgBox "Press the button, silly"
Application.cursor = cursor_setting

End Sub

hth,

Doug Glancy

"swatsp0p" wrote in message
...
Well, I thought I had seen it. Trying to automate so even the most novice
user can operate, I wrote a macro that does extensive reformatting of
imported data. I even turn off screen updating whilst it is running.

When
it is finished, a message box opens, saying "Formatting Finished. Click

OK".
Self explanatory, right? Wrong. Because the macro is suspending

awaiting
the "click", the mouse arrow turns to an hourglass.... so the operator

says
to me (after waiting I don't know how long), "But it's not done, there's
still an hourglass!".

So, is there a way to have the mouse automatically positioned 'within' the
message box-so the hourglass returns to an arrow? I know the mouse setup

in
control panel can make this a default Windows feature (Snap To), but I

don't
control the users of this app's pc.

Any ideas would be appreciated. Good luck!

TIA

swatsp0p
--
The older I get, the better I used to be.




Vic Eldridge

position mouse cursor in msg box
 
Why make this rank novice click a button at all ?
Just show him a progress bar and/or a "please wait" message that
disappears when the macro is finished.


"swatsp0p" wrote in message ...
Well, I thought I had seen it. Trying to automate so even the most novice
user can operate, I wrote a macro that does extensive reformatting of
imported data. I even turn off screen updating whilst it is running. When
it is finished, a message box opens, saying "Formatting Finished. Click OK".
Self explanatory, right? Wrong. Because the macro is suspending awaiting
the "click", the mouse arrow turns to an hourglass.... so the operator says
to me (after waiting I don't know how long), "But it's not done, there's
still an hourglass!".

So, is there a way to have the mouse automatically positioned 'within' the
message box-so the hourglass returns to an arrow? I know the mouse setup in
control panel can make this a default Windows feature (Snap To), but I don't
control the users of this app's pc.

Any ideas would be appreciated. Good luck!

TIA

swatsp0p



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com