NoFlicker



#If Win16 Then
Declare Function LockWindowUpdate Lib _
"User" (ByVal hWndLock As Integer) As Integer
#Else
Declare Function LockWindowUpdate Lib _
"user32" (ByVal hWndLock As Long) As Long
#End If
'The hWndLock variable refers to the hWnd property of the form where you don't want

'to have screen updates shown. When you reissue the LockWindowUpdate with a value

'of 0 for hwndLock, you'll free up the screen and all updates will be shown instantly:

Dim lErr as Long
Dim x as Integer
'No list box flicker, it will appear blank for

'just a moment…

Screen.MousePointer = vbHourglass
lErr = LockWindowUpdate(Me.hWnd)
For x = 1 to 5000
lstMyListbox.AddItem CStr(x)
Next
Now all the information is there:
lErr = LockWindowUpdate(0)
Screen.MousePointer = vbDefault

(noflicker.html)- by Paolo Puglisi - Modifica del 25/3/2019