Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selecting optButton value into worksheet

Status
Not open for further replies.

ironj32

Technical User
Dec 7, 2006
73
0
0
US
I've got a UserForm that is connected to another worksheet. I am having a problem figuring out the code for selecting the value of a option Button group
the GroupName is "SelectOne". this is probably really easy. thanks!
Code:
Private Sub cmdSave_Click()
Dim irow As Long
Dim ws As Worksheet
Set ws = Worksheets("ContractWorkSheet")

'find first empty row in database
irow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row

'copy the data to the database
ws.Cells(irow, 1).Value = Me.txtUSBManager
ws.Cells(irow, 2).Value = Me.txtVendorName
ws.Cells(irow, 3).Value = Me.txtContractStartDate
ws.Cells(irow, 4).Value = Me.txtExpectedTerm
ws.Cells(irow, 5).Value = Me.txtExpectedValue
ws.Cells(irow, 6).Value = Me[b].GroupName.SelectOne[/b]
                                

End Sub
 
Have you tried this ?
Me.SelectOne

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
i have, doesn't seem to wanna work.
 
Me.SelectOne.Value should returns the value of the selected option button.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top