problem with user form
I have the following program to indicate progress of a procedure. The user
form ProgInd contains one textbox (which has a blue background). When I step through the program, it displays each value of i correctly but when I run the program, all I get is the form with a caption and a white background. At the end of the program, the form displays the value 1000 on a blue background as it should. I expect to see the value of i ticking over (albeit very quickly) as the loop is processed. Can someone tell me how to get the desired result please? Thanks Chris Sub testprog() ProgInd.Show False For i = 1 To 1000 ProgInd.TextBox1.Value = i perform some operations Next i End Sub |
problem with user form
Its ok, figured I needed a doevents after setting the value of the textbox
"chris" wrote in message u... I have the following program to indicate progress of a procedure. The user form ProgInd contains one textbox (which has a blue background). When I step through the program, it displays each value of i correctly but when I run the program, all I get is the form with a caption and a white background. At the end of the program, the form displays the value 1000 on a blue background as it should. I expect to see the value of i ticking over (albeit very quickly) as the loop is processed. Can someone tell me how to get the desired result please? Thanks Chris Sub testprog() ProgInd.Show False For i = 1 To 1000 ProgInd.TextBox1.Value = i perform some operations Next i End Sub |
All times are GMT +1. The time now is 11:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com