| | |
Can adding and subtracting be done
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
Alright, I dont know if this can be done or not, but can you say, take either a caption or the text in a text box and add or subtract from what's in it, with a click of a button? Allow me to explain, lets say I have a text box with "100" as the text in it. Can I, with a click of a button, make it subtract from that 100?
Hi.
That is simple
I hope that is what you were looking for.
That is simple
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Form_Load() Me.Label1.Caption = 100 End Sub Private Sub Command1_Click() If IsNumeric(Me.Label1.Caption) Then Me.Label1.Caption = Me.Label1.Caption - 20 End Sub
I hope that is what you were looking for.
![]() |
Similar Threads
- Pointers (archived tutorial) (C++)
- Matrix (C++)
- Class Functions and Conversions (C)
- JDBC for Access Database (Java)
- Program Output Display Tweak Help (Java)
- Classes (C++)
- Using binary operators! (C)
- Pointers (C++)
- a program about fractions (C++)
- Open proxy? (Windows NT / 2000 / XP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Mail, minimise and browser question.
- Next Thread: problem with opening form
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





