View Single Post
Join Date: Aug 2008
Posts: 28
Reputation: nor_d83 is an unknown quantity at this point 
Solved Threads: 0
nor_d83 nor_d83 is offline Offline
Light Poster

Re: Substraction code in MSFlex Grid

 
0
  #8
Jan 9th, 2009
Sorry... But, it didn't work.. Maybe, because i don't know how and where to use it.. I copied and pasted the latest codes by Venna in the private Sub Grd_Click like below..
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub Grd_Click()
  2. Dim i As Integer
  3. Dim TAmt As Currency
  4. TAmt = 0
  5. For i = 1 To Grd.Rows - 1
  6. TAmt = TAmt + Val(Grd.TextMatrix(i, 8))
  7. Next
  8. TAmt = Val(txtBudget.Text) - TAmt
  9. txtBalance.Text = Format(TAmt, "0.00")
  10. End Sub
Did i use it incorrectly? Here i enclosed a small-sized of the related form, to show u what i'm doing..

P/S: Do i need to put codes also in the txtBudget and txtBalance? Sorry for the dumb question...
Last edited by Narue; Jan 10th, 2009 at 9:33 pm. Reason: added code tags
Attached Files
File Type: zip sample.zip (14.1 KB, 13 views)
Reply With Quote