USE MFLEXGRID IN FUNCTION....

User avatar
sal21
PlatinumLounger
Posts: 4334
Joined: 26 Apr 2010, 17:36

USE MFLEXGRID IN FUNCTION....

Post by sal21 »

Is this correct to pass the name of msflexgrid to a function?

Code: Select all


...
SCRIVI_PREZZO Me.MSFlexGrid1
...


Private Sub SCRIVI_PREZZO(PFLEX As MSFlexGrid)

    Dim C As Integer

    C = 1

    With PFLEX
        .Redraw = False
        For K = LBound(STRPREZZO) To UBound(STRPREZZO)
            .TextMatrix(C, 52) = Format$(Split(STRPREZZO(K), "|")(1), "#,##0.00")
            C = C + 1
        Next K
        .Redraw = True
    End With

End Sub

User avatar
HansV
Administrator
Posts: 78237
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: USE MFLEXGRID IN FUNCTION....

Post by HansV »

That looks OK.
Best wishes,
Hans

User avatar
SpeakEasy
4StarLounger
Posts: 536
Joined: 27 Jun 2021, 10:46

Re: USE MFLEXGRID IN FUNCTION....

Post by SpeakEasy »

>to pass the name

Possibly a language issue - but you are passing a lot more than the name; you are passing the entire object. Whicxh is perhaps what you were really asking.

User avatar
sal21
PlatinumLounger
Posts: 4334
Joined: 26 Apr 2010, 17:36

Re: USE MFLEXGRID IN FUNCTION....

Post by sal21 »

SpeakEasy wrote:
25 Oct 2021, 07:53
>to pass the name

Possibly a language issue - but you are passing a lot more than the name; you are passing the entire object. Whicxh is perhaps what you were really asking.
YES... infact.