Option Button Question

Tompanilla

New Member
Joined
Nov 3, 2005
Messages
47
I have a form with two textboxes, twocomboboxes and also three option Buttons.
The form has buttons for saving the information in the form, empty the form and change information as well as quit the form.

In the form the user can choose to save all the information at 6 different areas on the worksheet (depending on info in combobox2)

I have no problems to save all the information on the right places in the worksheet, but I have problems when I am trying to edit/change the saved information.

The problem is that I have 3 Option Buttons on the form and I cant find out how to take the stored cellinformation for the option buttons back to the form when it is called up for editing/changing purposes.
All cell information goes in to the form in ther textboxes and comboboxes, but nothing happens with the option boxes.

In the form the user marks that he/she will edit information stored as no: 1
and then hit the edit button. The stored optionbutton value does not reappear in the form but everything else comes to the form.

Example from my form:

SAVE CELLS
...
If ComboBox2.Value = "5" Then
Cells(58, 5).Value = TextBox1.Text
Cells(58, 2).Value = TextBox2.Text
Cells(58, 13).Value = ComboBox1.Text
End If
If OptionButton3 = True Then
Cells(60, 3).Value = ""
Else
End If
If OptionButton2.Value = True Then
Cells(60, 3).Value = "J"
Else
End If
If OptionButton1.Value = True Then
Cells(60, 3).Value = "N"
Else
End If
Unload Me

Any suggestion how I can programme the LoadCell Sub to get everything in right places?
Brgds :(
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
You can set your OptionButtons like this:

Code:
Select Case Cells(60, 3).Value
   Case "" 
      OptionButton3 = True
   Case "J" 
      OptionButton2.Value = True
   Case "N" 
      OptionButton1.Value = True
End Select
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,211
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top