Additional Controls


Visual Basic 6.0 Common Controls

https://www.microsoft.com/en-gb/download/details.aspx?id=10019
comctl32.ocx


mscomct2.ocx
C:\windows\system32\mscomctl.ocx
regsvr32 mscomctl.ocx


This includes the following ActiveX controls:
Microsoft Animation Control 6.0 (SP6)
Microsoft Date and Time Picker Control 6.0 (SP6)
Microsoft Flat ScrollBar Control 6.0 (SP6)
Microsoft MonthView Control 6.0 (SP6)
Microsoft ProgressBar Control 6.0
Microsoft Slider Control 6.0
Microsoft TreeView Control 6.0
Microsoft UpDown Control 6.0 (SP6)


Microsoft ListView Control 6.0

Private Sub UserForm_Initialize() 
    Me.ListView1.View = lvwReport
    Me.ListView1.FullRowSelect = True
    Me.ListView1.HideColumnHeaders = False

    Me.ListView1.ColumnHeaders.Clear
    Me.ListView1.ColumnHeaders.Add , , "Date", 55, lvwColumnLeft
    Me.ListView1.ColumnHeaders.Add , , "Name", , lvwColumnRight
    Me.ListView1.ColumnHeaders.Add , , "Amount", , lvwColumnRight
    
    Me.ListView1.ListItems.Clear
    Me.ListView1.ListItems.Add 1, "key1", "01/06/2016"
    Me.ListView1.ListItems.Item("key1").SubItems(1) = "Customer 1"
    Me.ListView1.ListItems.Item("key1").SubItems(2) = "56,000"
    
    Me.ListView1.ListItems.Add 2, "key2", "01/06/2016"
    Me.ListView1.ListItems.Item("key2").SubItems(1) = "Customer 2"
    Me.ListView1.ListItems.Item("key2").SubItems(2) = "98,564"
End Sub

Common Error

Compile Error
Object library invalid or contains references to object definitions that could not be found.



© 2018 Better Solutions Limited. All Rights Reserved. © 2018 Better Solutions Limited TopPrevNext