Yahoo Clever wird am 4. Mai 2021 (Eastern Time, Zeitzone US-Ostküste) eingestellt. Ab dem 20. April 2021 (Eastern Time) ist die Website von Yahoo Clever nur noch im reinen Lesemodus verfügbar. Andere Yahoo Produkte oder Dienste oder Ihr Yahoo Account sind von diesen Änderungen nicht betroffen. Auf dieser Hilfeseite finden Sie weitere Informationen zur Einstellung von Yahoo Clever und dazu, wie Sie Ihre Daten herunterladen.
Visual basic arithmetic code?
how to add subtract number from textbox1.text and textbox2.text and the answer in textbox3.text
3 Antworten
- vor 1 JahrzehntBeste Antwort
amh_soft's answer is right on, but I thought I'd add that you should make sure that the textboxes have valid input.
ex, just do an isNumeric check first
if isNumeric(textbox1.text) and isNumeric(textbox1.text) then
textbox3 = textbox1.text - textbox2.text
else
'raise error
end if
edit: I forgot to mention about the val() function, it usually works, but there's reasons not to use it.
Quelle(n): http://www.a1vbcode.com/vbtip-57.asp - Anonymvor 1 Jahrzehnt
for both T1 and T2, you create an afterupdate event
in that event you put:
t3.value = t1.value - t2.value