I have developed a search function within Excel. There can be multiple results.
The results are listed on a page. I would like to be able to:
1. Create the number Option buttons according to the number search results
2. Make the Option buttons visible.
Alternatively, I have created 100 Option Buttons but would need to make the number of Option buttons visible according to the number of search results.
I tried using this code but it doesn't work.
For i = 3 To SearchCount
OPTButton = "Workbooks(wbname).Worksheets(""Search Results"").Opt" & i
Workbooks(wbname).Worksheets("Search Results").OPTButton.Visible = True
Next i
The results are listed on a page. I would like to be able to:
1. Create the number Option buttons according to the number search results
2. Make the Option buttons visible.
Alternatively, I have created 100 Option Buttons but would need to make the number of Option buttons visible according to the number of search results.
I tried using this code but it doesn't work.
For i = 3 To SearchCount
OPTButton = "Workbooks(wbname).Worksheets(""Search Results"").Opt" & i
Workbooks(wbname).Worksheets("Search Results").OPTButton.Visible = True
Next i