Good morning all. I hope that I'm putting this in the correct place, I've looked and some of the answers I've found answer part of the issue but not all. I have a userform. When the user double-clicks the "Vendor" cell in the workbook, it pulls a userform with 28 vendors attached to option buttons. There can be only one vendor per cell, which is exactly how I need it. My problem is when an optionbutton is selected, how do I make it automatically populate the ActiveCell with the .Caption from the option button and close the UserForm? I know that I can manually attach code to each and every optionButton to perform this action, but that's amazingly tedious and very messy for code.
Here's the code that I can attach to each button (although this is probably pointless for the folks here)
Here's the code that I can attach to each button (although this is probably pointless for the folks here)
VBA Code:
Private Sub OptionButton1_Click()
If OptionButton1.Value = True Then
ActiveCell.Value = OptionButton1.Caption
End If
End Sub