-
Anyone know how to update a status bar on a main form from another form?
I have main form that controls my app (frmMain) that I want to update the status bar from within another form that was called by the main form.
Here's the code I used but the main form never shows the text in the statusbar.
frmMain.sbStatusBar.Panels(1) = "My Test Text"
If I put this line somewhere in the code of FrmMain it will work.
Thanks.
-
Refresh Status Bar
After the line of code that says
Code:
frmMain.sbStatusBar.Panels(1) = "My Test Text"
place the following code
Code:
frmMain.sbStatusBar.Refresh
-
Or, you can simply change the command to give a direct call to the text property.
frmMain.sbStatusBar.Panels(1).Text = "My Test Text"
-
Actually, I did have the .text reference but I forgot to type it in my original post.
I also tried the .Refresh but it didn't work either.
-
You could try either of the following after setting the text in the status bar.
or you could try
-
In case anyone cares, I figured out how to update the statusbar. None of the above methods worked but thanks for the posts.
The status bar could not be updated unless the second form that was called by the main form finished executing. So I setup a function to execute immediately after the frmSecondform.show code.
If someone could explain why that form must complete that would be great!
Thanks