userfom shows up white even though it's grey designed

  • Thread starter Thread starter Peter Ostermann
  • Start date Start date
P

Peter Ostermann

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
 
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)
 
Back
Top