![]() |
Status Message
Is there a simple way to pop up a message type box with a variable message
that would stay around for two seconds and then disappear? I would like to not stop the main macro from running during the time the box is in view. I have some very long procedures that I would like to show some simple indication of progress. Merry Christmas. Thanks in advance for your help! Ray |
Status Message
Ray,
In Excel 2000 and later, you can use a userform to display the message and keep code running while the form is displayed. For example, UserForm1.Show vbModelsss -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Ray Batig" wrote in message link.net... Is there a simple way to pop up a message type box with a variable message that would stay around for two seconds and then disappear? I would like to not stop the main macro from running during the time the box is in view. I have some very long procedures that I would like to show some simple indication of progress. Merry Christmas. Thanks in advance for your help! Ray |
<Chip Pearson Status Message
Thanks Chip,
I built the following code to implement the concept. However, the userform pops up as an outline with a visible title. I can't see the message. Any ideas on how to fix? This is a very nice way to show where you are. Regards, Ray Sub PopUpInfo(PuMsg) ' this pops up an information box for for 2 seconds Dim StartTime As Long UserForm1.ListBox1.Clear ' clear box and load data With UserForm1.ListBox1 .AddItem (PuMsg) End With UserForm1.Show vbModeless ' hold userfrom for specified seconds StartTime = Second(Now()) Do While Second(Now()) - StartTime < 3 Loop Unload UserForm1 End Sub Chip Pearson wrote in message ... Ray, In Excel 2000 and later, you can use a userform to display the message and keep code running while the form is displayed. For example, UserForm1.Show vbModelsss -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Ray Batig" wrote in message link.net... Is there a simple way to pop up a message type box with a variable message that would stay around for two seconds and then disappear? I would like to not stop the main macro from running during the time the box is in view. I have some very long procedures that I would like to show some simple indication of progress. Merry Christmas. Thanks in advance for your help! Ray |
<Chip Pearson Status Message
Ray,
Use a DoEvents and Repaint within your loop. E.g., UserForm1.Show vbModeless Do Until Whatever ' your code DoEvents UserForm1.Repaint Loop -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Ray Batig" wrote in message link.net... Thanks Chip, I built the following code to implement the concept. However, the userform pops up as an outline with a visible title. I can't see the message. Any ideas on how to fix? This is a very nice way to show where you are. Regards, Ray Sub PopUpInfo(PuMsg) ' this pops up an information box for for 2 seconds Dim StartTime As Long UserForm1.ListBox1.Clear ' clear box and load data With UserForm1.ListBox1 .AddItem (PuMsg) End With UserForm1.Show vbModeless ' hold userfrom for specified seconds StartTime = Second(Now()) Do While Second(Now()) - StartTime < 3 Loop Unload UserForm1 End Sub Chip Pearson wrote in message ... Ray, In Excel 2000 and later, you can use a userform to display the message and keep code running while the form is displayed. For example, UserForm1.Show vbModelsss -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Ray Batig" wrote in message link.net... Is there a simple way to pop up a message type box with a variable message that would stay around for two seconds and then disappear? I would like to not stop the main macro from running during the time the box is in view. I have some very long procedures that I would like to show some simple indication of progress. Merry Christmas. Thanks in advance for your help! Ray |
<Chip Pearson Status Message
Chip,
Thanks. Works very well. Merry Christmas!! Ray Chip Pearson wrote in message ... Ray, Use a DoEvents and Repaint within your loop. E.g., UserForm1.Show vbModeless Do Until Whatever ' your code DoEvents UserForm1.Repaint Loop -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Ray Batig" wrote in message link.net... Thanks Chip, I built the following code to implement the concept. However, the userform pops up as an outline with a visible title. I can't see the message. Any ideas on how to fix? This is a very nice way to show where you are. Regards, Ray Sub PopUpInfo(PuMsg) ' this pops up an information box for for 2 seconds Dim StartTime As Long UserForm1.ListBox1.Clear ' clear box and load data With UserForm1.ListBox1 .AddItem (PuMsg) End With UserForm1.Show vbModeless ' hold userfrom for specified seconds StartTime = Second(Now()) Do While Second(Now()) - StartTime < 3 Loop Unload UserForm1 End Sub Chip Pearson wrote in message ... Ray, In Excel 2000 and later, you can use a userform to display the message and keep code running while the form is displayed. For example, UserForm1.Show vbModelsss -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Ray Batig" wrote in message link.net... Is there a simple way to pop up a message type box with a variable message that would stay around for two seconds and then disappear? I would like to not stop the main macro from running during the time the box is in view. I have some very long procedures that I would like to show some simple indication of progress. Merry Christmas. Thanks in advance for your help! Ray |
All times are GMT +1. The time now is 08:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com