A
Aravind
hello everybody,
I created a user form with certain number of option buttons, text
boxes and check boxes. i was wondering how to clear these values of
these buttons after the user has submitted the data into the excel
sheet. so that new data can be entered into the text boxes and the
check box is not checked accidentally.
EXAMPLE:
name: TEXTBOX1
number: TEXTBOX2
email: TEXTBOX3
i know the a very easy way to clear the text box is to set the
textbox1.text = "" after the submit button is pressed.
Another problem is to use VBA if an option button is selected i want
one of the three text boxes to be put into the excel sheet. this
something i wrote in VBA.
StationBox, RadioBox and OtherBox are text boxes. qs75 qs74 qs73 are
Option buttons
Private Sub Submit_Click()
Dim LastRow As Object
Set LastRow = Sheet1.Range("a65536").End(xlUp)
If qs75.Value = True Then
LastRow.Offset(1, 14).Value = StationBox.Text
End If
If qs74.Value = True Then
LastRow.Offset(1, 14).Value = RadioBox.Text
End If
If qs73.Value = True Then
LastRow.Offset(1, 14).Value = OtherBox.Text
End If
I created a user form with certain number of option buttons, text
boxes and check boxes. i was wondering how to clear these values of
these buttons after the user has submitted the data into the excel
sheet. so that new data can be entered into the text boxes and the
check box is not checked accidentally.
EXAMPLE:
name: TEXTBOX1
number: TEXTBOX2
email: TEXTBOX3
i know the a very easy way to clear the text box is to set the
textbox1.text = "" after the submit button is pressed.
Another problem is to use VBA if an option button is selected i want
one of the three text boxes to be put into the excel sheet. this
something i wrote in VBA.
StationBox, RadioBox and OtherBox are text boxes. qs75 qs74 qs73 are
Option buttons
Private Sub Submit_Click()
Dim LastRow As Object
Set LastRow = Sheet1.Range("a65536").End(xlUp)
If qs75.Value = True Then
LastRow.Offset(1, 14).Value = StationBox.Text
End If
If qs74.Value = True Then
LastRow.Offset(1, 14).Value = RadioBox.Text
End If
If qs73.Value = True Then
LastRow.Offset(1, 14).Value = OtherBox.Text
End If