I'm working on a game inwhich I'm using text boxes to keep track of money. When I try to add or subtract from them it is adding them together like a string.
Ex., Private Sub CmndStash_Click()
frmMainGame.TextCash.Text = (frmMainGame.TextCash.Text - Me.TxtStash.Text)
frmMainGame.TextStashedCash.Text = (frmMainGame.TextStashedCash.Text +Me.TxtStash.Text)
Unload Me
End Sub
For some reason when I add the money together it gets results like this:
frmMainGame.TextStashedCash.Text = $200
frmMainGame.TextCash.Text = $150
Adding them both using the procedure listed above equals $200,$150
Or sometimes when I change the formating it equals $200,150
Any help out there?
Enter your message below
Sign in or Join us (it's free).