Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assign Value to OptionBotton then transfer to spreadsheet
Hello all,
I need a general education on how to program an OptionButton. I have created a userform in visual basic. It has a frame with option buttons. One of which, specifies "Other", and has a textbox fo user input. What code is needed to: 1. Assign a value to each option button 2. Have the value assigned put into ThisWorkbook.Sheets("Masterlist").Range("d2") - if the option i selected Please help... Excel Nerd:confused -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assign Value to OptionBotton then transfer to spreadsheet
Optionbuttons cannot be assigned values per se, they can only be on or off.
You could check it when pressed and set the value that way Private Sub OptionButton1_Click() If Me.OptionButton1.Value Then Range("B1").Value = "Button off" End If End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Excel Nerd " wrote in message ... Hello all, I need a general education on how to program an OptionButton. I have created a userform in visual basic. It has a frame with 5 option buttons. One of which, specifies "Other", and has a textbox for user input. What code is needed to: 1. Assign a value to each option button 2. Have the value assigned put into - ThisWorkbook.Sheets("Masterlist").Range("d2") - if the option is selected Please help... Excel Nerd --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Transfer Spreadsheet problems | Excel Discussion (Misc queries) | |||
Transfer Spreadsheet question... | Excel Discussion (Misc queries) | |||
Transfer Spreadsheet | Excel Worksheet Functions | |||
Transfer text to another spreadsheet | New Users to Excel | |||
how to Assign Hyperlink to Button in Spreadsheet | Excel Discussion (Misc queries) |