View Single Post
 
Old 11-06-2010, 08:52 AM
sauerj sauerj is offline Windows XP Office 2003
Novice
 
Join Date: Nov 2010
Location: Lafayette, IN
Posts: 2
sauerj is on a distinguished road
Question How do I avoid Hourglass using API Function?

Hello, In MS WORD (version 2003), I am trying to use a Windows API MessageBoxA function in place of the VBA built-in MsgBox() function. Why? I want the message box to be modeless so that user can select text inconjunction w/ the operating macro, and, to me, building a UserForm for these multiple user interactive tasks is much too cumbersome.

This API approach works OK, except for one issue. When I run the macro and move my mouse outside of the MB window, the cursor is displayed as an HOURGLASS. The HOURGLASS will confuse the user. What can I do to get the HOURGLASS to turn back to a normal arrow cursor.
NOTE: If I right-click when outside of the API window and then left-click, the HOURGLASS goes away. ... Also, if the macro is started while in the VB editor window, then the HOURGLASS never occurs. So, seems like there would be a way to avoid this hourglass.
Any help is greatly appreciated. ... Thank you, sauerj
PS: See attachment which contains the macro containing these MessageBox API functions.

Added Cross-Post LINK: http://www.excelforum.com/word-progr...-function.html
Attached Files
File Type: doc Msgbox_API_Test1.doc (46.0 KB, 14 views)

Last edited by sauerj; 11-06-2010 at 12:00 PM. Reason: Added Cross-Post Link
Reply With Quote