ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   userfom shows up white even though it's grey designed (https://www.excelbanter.com/excel-programming/378473-userfom-shows-up-white-even-though-its-grey-designed.html)

Peter Ostermann[_3_]

userfom shows up white even though it's grey designed
 
Hi NG,

I run a Progressbar placed in an userform.
the userform is grey BackColor designed but appears
white when I run the code without "Stop" and the textbox
"tbProgBar" doesn't show up.

When I run the following code interrupted by "Stop"
everything is visible and stays visible when running
after the Stop. The only thing that is functionating in
both cases is the Progressbar. If I run everything
using "vbModal" it traps into a loop at that statement.

Has anyone an idea what is going on or better "going"
wrong? Thanks in advance for every hint.

Regards
Peter Ostermann
PS: environment Excel 2000

ufmProgressBar.ProgressBar1.Max = lastRow
Call ufmProgressBar_Modeless
For I = 2 To lastRow
ufmProgressBar.ProgressBar1.Value = I
ufmProgressBar.tbProgBar = ProgBarText
-.................

Sub ufmProgressBar_Modeless()
Unload ufmProgressBar
Load ufmProgressBar
ufmProgressBar.Show vbModeless
Stop
End Sub

Private Sub UserForm_Initialize()
ufmProgressBar.tbProgBar = ProgBarText
ufmProgressBar.BackColor = RGB(170, 170, 170)
ufmProgressBar.tbProgBar.Visible = True
End Sub

Bob Phillips

userfom shows up white even though it's grey designed
 
Try issuing a DoEvents in the code


ufmProgressBar.ProgressBar1.Value = I
ufmProgressBar.tbProgBar = ProgBarText
DoEvents


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Peter Ostermann" wrote in message
...
Hi NG,

I run a Progressbar placed in an userform.
the userform is grey BackColor designed but appears
white when I run the code without "Stop" and the textbox
"tbProgBar" doesn't show up.

When I run the following code interrupted by "Stop"
everything is visible and stays visible when running
after the Stop. The only thing that is functionating in
both cases is the Progressbar. If I run everything
using "vbModal" it traps into a loop at that statement.

Has anyone an idea what is going on or better "going"
wrong? Thanks in advance for every hint.

Regards
Peter Ostermann
PS: environment Excel 2000

ufmProgressBar.ProgressBar1.Max = lastRow
Call ufmProgressBar_Modeless
For I = 2 To lastRow
ufmProgressBar.ProgressBar1.Value = I
ufmProgressBar.tbProgBar = ProgBarText
-.................

Sub ufmProgressBar_Modeless()
Unload ufmProgressBar
Load ufmProgressBar
ufmProgressBar.Show vbModeless
Stop
End Sub

Private Sub UserForm_Initialize()
ufmProgressBar.tbProgBar = ProgBarText
ufmProgressBar.BackColor = RGB(170, 170, 170)
ufmProgressBar.tbProgBar.Visible = True
End Sub




Peter Ostermann[_3_]

userfom shows up white even though it's grey designed
 
Thats it! Thanks Bob.

Peter Ostermann

"Bob Phillips" worte

Try issuing a DoEvents in the code


ufmProgressBar.ProgressBar1.Value = I
ufmProgressBar.tbProgBar = ProgBarText
DoEvents


--

HTH




All times are GMT +1. The time now is 01:06 AM.

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