Assuming you are using the option buttons from the Controls command
bar not the Forms command bar, you can use code like the following:
Private Sub OptionButton1_Click()
Range("A1").Value = Range("B1").Value
End Sub
Private Sub OptionButton2_Click()
Range("A2").Value = Range("B1").Value
End Sub
Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Fri, 12 Dec 2008 00:20:00 -0800, Noepie
wrote:
Hello,
I have a sheet where people can choose between two options. I make use of
the OptionButton in the VBA Editor. What I want is that when Option 1 is
chosen, the worksheet fills in the value from A1 in to B1. When Option 2 is
chosen, the value from A2 should be filled in in to B1. How can I achieve
this?
Kind regards,
Noepie