Hi All :wave:
Like in a title. For the load e.g. 2000 records
Someone know?
Thanks in advance
Printable View
Hi All :wave:
Like in a title. For the load e.g. 2000 records
Someone know?
Thanks in advance
VB Code:
' in a module Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const CB_INITSTORAGE = &H161 Public Sub ComboInitStorage(ByRef ComboBox As Object, ByVal Items As Long, ByVal ItemSizeEstimate As Long) SendMessage ComboBox.hwnd, CB_INITSTORAGE, Items, ByVal (Items * ItemSizeEstimate) End Sub
Example:
VB Code:
Private Sub Command1_Click() ' init space for 2000 items reserving 50 bytes per item ComboInitStorage Combo1, 2000, 50 ' then add code to fill the combobox... End Sub
Thanks Merri, unfortunatelly it not help me
It’s still slowly.
Have you also tried setting Visible = False while you're loading the data and then True once you're done?
Is the code you use to add the items very straightforward and simple or does it have more complexity than just a simple add within a loop?