userfom shows up white even though it's grey designed

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
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top