snb - Thank you for your help. unfortunately, the original version of my problem has many permutations and combinations of Group and associated items under them and managing a form would not be feasable. However, I have other related tasks for which I can definetely make use of this. Appreciate it !.
Jerry - I made use of your code and edited it to have radio buttons included which the users are liking. I'll run the show with this as long as I dont end up in trouble. I've saved the file you provided with the method of double clicking and will surely make use of it as an " Enhancement " for the future :-)
btw, the updated appearance to resemble a radio button is cool...
Thanks again !
Here's my scribble making use of what you had provided originally... let me know what you feel about it.. ( File Attached aswell )
Option Explicit
Sub Add_Option_Button()
Dim cell As Range, MyRNG As Range
Dim BR As Long, FR As Long, LR As Long
Dim Target As Range
Dim group_name As String
Dim counter As Integer
counter = 1
If ActiveSheet.OLEObjects.Count > 0 Then
ActiveSheet.OLEObjects.Delete
End If
Range("D:D").ClearContents
Range("A1").End(xlDown).Select
While ActiveCell.Text <> ""
group_name = ActiveCell.Text
Set Target = Range(ActiveCell.Address)
FR = Target.Row
LR = Range("B" & Rows.Count).End(xlUp).Row
BR = WorksheetFunction.Min(LR, Range("A" & Target.Row).End(xlDown).Row - 1)
Set MyRNG = Range("C" & FR, "C" & BR)
For Each cell In MyRNG
With ActiveSheet.OLEObjects.Add(ClassType:="Forms.OptionButton.1", Link:=False, _
DisplayAsIcon:=False, Left:=cell.Left + 5, Top:=cell.Top + 2, Width:=cell.Width - 6, Height:=cell.Height - 3)
.Name = group_name & counter
.LinkedCell = cell.Offset(0, 1).Address
.Object.Caption = ""
.Object.SpecialEffect = 0
.Object.GroupName = group_name
End With
counter = counter + 1
Next cell
ActiveCell.End(xlDown).Select
Wend
Range("A1").Select
End Sub
Bookmarks