Hello,
I am trying to total a column. It works fine when the values are entered manually. Not so when the values are pasted using the MLG_Put() function. I guess the values pasted are seen as strings.
Has anyone noticed this? How can this be fixed.
Kind regards.
I am trying to total a column. It works fine when the values are entered manually. Not so when the values are pasted using the MLG_Put() function. I guess the values pasted are seen as strings.
Has anyone noticed this? How can this be fixed.
Kind regards.
Code:
Function TotalCredit(MyGrid As Long) As String Local tot As Double Local x,y As Long tot = 0 For x = 4 To 4 For y = 1 To 10 tot = tot + Val(MLG_Get(myGrid,y,x)) Next y Next x Control Set Text hJournalEntry, %ID_FRMJOURNALENTRY_LBLSUMCREDIT, Format$(tot, "#,.00") Function = Format$(tot) End Function Case %MLGN_COMBOCHANGED [email protected] 'current row [email protected] 'current col sDescription = MLG_Get(hJournalGrid, 1, 2) MLG_Put(hJournalGrid,2, 2, sDescription,1) dDebit = Val(MLG_Get(hJournalGrid, 1, 3)) MLG_Put(hJournalGrid,2, 4, Format$(dDebit, "#,.00"), 1) TotalCredit(hJournalGrid)
Comment