sayedqurrat
New Member
- Joined
- Jun 8, 2015
- Messages
- 4
difficulty in summing up values in the textboxes in another textbox. I have created a form of a marksheet form with 10 labels with textboxes alongside them :name, admn no, DOB, 5 subjects labels, total and result. and HV created an add record cmdbtn.
This is the code I HV typed.
( my program still not getting run. Pls tel me a proper code tto add all the inputs of the record and also a code to sum up the marks of the subject to display it in the "total textbox" and I would also like to know how to write a code for the "result" label? Please help me...its been a week since I am breaking my head for this...until I got you ppl..please help me by telling me the codes for the same
This is the code I HV typed.
Code:
Pvt sub addrecord_click
Dim lastrow as object
Set lastrow=sheet1.range("a65536").end(xlup)
Lastrow.offset(1,0).value=textbox1.text
.......to
Lastrow.offset(1,7).value= textbox8.text
Msgbox" one record written on your sheet1"
Response= msgbox(" do you want to enter another record?",vbyesno)
If response= vbyes Then
Textbox1.text= ""
........
Textbox8.text = ""
Textbox1.set focus
Else
Unload Me
End if
End sub
Last edited by a moderator: