I have a lot of MshFlexgrids in different forms and am tired of setting the grid size to match it's rows. So I have decided to make a public sub in a bas module and just pass the grids name, but am missing something.
maybe i'm getting brain dead, but i am having trouble getting this to work

Public Sub SetGridSize(ByRef grd As MSHFlexGrid)
With grd
.Height = .Rows * .RowHeight(.Rows - 1)' use the height of the last row
End With

End Sub

I am calling it like this: In form
SetGridSize DocGrid

but am getting a "wrong arguments or invalid property assignment" message
what is wrong ?