ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Info Message without a response needed (https://www.excelbanter.com/excel-programming/431317-info-message-without-response-needed.html)

Lemi

Info Message without a response needed
 
Excel 2007 & Windows XP pro
Some of the sub-operations in my UserForm take longer time than the others
and I want to display an info message something like "Processing..." or
"Refreshing..." during the process.
This message should not have any buttons and expect a user response. It is
supposed appear during the process without interrupting it and disappear
when process is over. Excel's MsgBox function has always a button waiting
for a response from the User.
I have come accross in the MS Knowledgebase "Call the Windows API function
MessageBox()" but I couldn't understand how. Also I am not sure if it is
relevant to my case. Can anyone help me how to solve this please?

Regards,
Lemi



royUK[_140_]

Info Message without a response needed
 

Use a modeless userform which is displayed at the start of the code,
then at the end of the code unload it


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=117514


Rick Rothstein

Info Message without a response needed
 
You could always use a Locked TextBox (make the caption say "Pending..." or
whatever else you want; and you can add text/background coloring if you want
to also) that has been placed on top of all the other controls (execute the
control's ZOrder method to do this)... start it off invisible, make it
visible just before you start your lengthy process add make it invisible
again afterwards.

--
Rick (MVP - Excel)


"Lemi" wrote in message
...
Excel 2007 & Windows XP pro
Some of the sub-operations in my UserForm take longer time than the others
and I want to display an info message something like "Processing..." or
"Refreshing..." during the process.
This message should not have any buttons and expect a user response. It is
supposed appear during the process without interrupting it and disappear
when process is over. Excel's MsgBox function has always a button waiting
for a response from the User.
I have come accross in the MS Knowledgebase "Call the Windows API function
MessageBox()" but I couldn't understand how. Also I am not sure if it is
relevant to my case. Can anyone help me how to solve this please?

Regards,
Lemi



Lemi

Info Message without a response needed
 
Thank you Rick and Roy,
I have developed a simpler solution myself..
I have added a label (desired message:"Refreshing, please wait...") with
visible set to off from the properties.
Then in the click event of the button that runs the sub-macro to refresh the
data I have made the label visible and repaint the userform just before
calling the macro. Make the label invisible again after the macro. Suppose
you have a main UserForm1 and a button named Accounts which runs the macro
named Select Account() and the messaging Label10 on the form

Private Sub Accounts_Click()
UserForm1.Label10.Visible=True
UserForm1.Repaint
SelectAccount
UserForm1.Label10.Visible=False
End Sub

Rgds/Lemi

"Rick Rothstein" wrote in message
...
You could always use a Locked TextBox (make the caption say "Pending..."
or whatever else you want; and you can add text/background coloring if you
want to also) that has been placed on top of all the other controls
(execute the control's ZOrder method to do this)... start it off
invisible, make it visible just before you start your lengthy process add
make it invisible again afterwards.

--
Rick (MVP - Excel)


"Lemi" wrote in message
...
Excel 2007 & Windows XP pro
Some of the sub-operations in my UserForm take longer time than the
others and I want to display an info message something like
"Processing..." or "Refreshing..." during the process.
This message should not have any buttons and expect a user response. It
is supposed appear during the process without interrupting it and
disappear when process is over. Excel's MsgBox function has always a
button waiting for a response from the User.
I have come accross in the MS Knowledgebase "Call the Windows API
function MessageBox()" but I couldn't understand how. Also I am not sure
if it is relevant to my case. Can anyone help me how to solve this
please?

Regards,
Lemi






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

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