Bit of a newbie question I guess but I would appreciate some help here.
I have in my Excel forms multiple iGrids on a multipage control. Say myGrid1 and my myGrid2.
I now want to create a generic VBA sub to which I could pass an iGrid as a parameter and perform some generic treatment, ie something like
Sub refreshList (prmGrid As iGrid)
prmGrid.DoSomething
End sub
I have created such a procedure but for some reason at execution I get a run-time error 13 "Type mismatch" when I try to call it from my form, ie
call refreshList (myForm.myGrid1)
I guess I can define my sub to take a generic object as parameter but (a) I lose all Intellisense for my code writing and (b) although it seems to work have have some weird behavior (ie the grid seems to freeze after some time).
Could anyone explain what is going on here ?