Possible causes userform is withe during....

User avatar
sal21
PlatinumLounger
Posts: 4343
Joined: 26 Apr 2010, 17:36

Possible causes userform is withe during....

Post by sal21 »

... a fill of listview? (see attached image)

In combobox Click event(0n the same userform) i have a code to fill a listview, and when i click on a combobox the userform is withe and i dont see nothing!,until the routine is finished i see normally.

Perphs is a question of memory? I need to use a repaint option?
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78394
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Possible causes userform is withe during....

Post by HansV »

I assume that you have some kind of loop to full the listview control. You could insert the line

Me.Repaint

inside the loop. This may slow down code execution, though.
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Possible causes userform is withe during....

Post by Rudi »

Could this be possible?

First Load the form
This will run through the looping code in the initialize event and populate the objects
Then Show the form

In Module:

Code: Select all

Sub MyMacro()
Load UserForm1
'Load triggers Initialize event to populate form...and the shows it
UserForm1.Show
End Sub
In Form Event Handler

Code: Select all

Private Sub UserForm_Initialize()
UserForm1.TextBox1.Value = "Test"
'Other actions to populate listboxes
'...
End Sub
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.