LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default User form Help

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
How to show User Form when form name is in string? Don Wiss Excel Programming 2 December 9th 06 03:52 AM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form BruceJ[_2_] Excel Programming 2 October 15th 03 05:28 PM


All times are GMT +1. The time now is 06:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"