ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change label caption on userForm while code runs (https://www.excelbanter.com/excel-programming/356221-change-label-caption-userform-while-code-runs.html)

Sliman

Change label caption on userForm while code runs
 
I am wanting to change label caption on userform while code runs.
Have got it working as follows inserted in break in VB but is there a
better way?

UserForm1.Hide
UserForm1.Show vbModeless
UserForm1.Label1.Caption = "Step 2 in progress"
Application.Wait Now + TimeValue("0:0:01")

Thanks
Simon


Tom Ogilvy

Change label caption on userForm while code runs
 
Possibly. Look at Chip Pearson's page on application.Ontime

http://www.cpearson.com/excel/ontime.htm

--
Regards,
Tom Ogilvy


"Sliman" wrote:

I am wanting to change label caption on userform while code runs.
Have got it working as follows inserted in break in VB but is there a
better way?

UserForm1.Hide
UserForm1.Show vbModeless
UserForm1.Label1.Caption = "Step 2 in progress"
Application.Wait Now + TimeValue("0:0:01")

Thanks
Simon




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

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