Hello,
I have downloaded the iGrid demo and have been playing around with it. My company is sick of the MSCOMCTL.OCX updates since every update seems to break any app with listviews.
However I'm stuck in my code since I just can't figure out how to pass an iGrid to a function/sub. It's bizarre that it's not working.
I have 9 listviews on my form (and hence will have 9 iGrids). It's imperative that I be able to pass an iGrid around else it will be a nightmare writing repetitive code.
Here's an example of what I'm trying to do (just doing an initial setup - adding columns and setting some properties for all iGrids). However I always get a type mismatch error.
If I try something like
Dim ig as iGrid
Set ig = igAuds
that also fails.
Private Sub UserForm_Initialize()
SetupIgrid igAuds, "File Name;140;Database ID;0;Computer;100;Workbook;100;UnitID;0"
SetupIgrid...
SetupIgrid...
SetupIgrid...
End Sub
Sub SetupIgrid(ig As iGrid, columns As String)
ig.RowMode = True
ig.MultiSelect = True
ig.Appearance = igAppearanceFlat
ig.Editable = False
Dim i As Byte
Dim values: values = Split(columns, ";")
For i = 0 To UBound(values) Step 2
ig.AddCol sHeader:=values(i), lWidth:=values(i + 1), bVisible:=IIf(values(i + 1) > 0, True, False)
Next
End Sub
Edited by moderator
2019-05-11T06:28:43Z
|
Reason: Not specified