Using GroupName

G

Guest

Hi
Is it possible to use the groupname to be able to make the option buttons
visible on a worksheet rather than the individual optionbutton names.

ie
optCheck, optHold, optNew
groupname = Testing

is there away to do the following

groupname(testing).visible = true

which makes the 3 option buttons visible.

Thanks
Noemi
 
G

Guest

To the best of my knowledge... No. You could write code to loop through all
of the option buttons in the frame but that would be a lot more work than
just coding the 3 buttons themselves...
 
T

Tom Ogilvy

No, but you could do

for each ole in OleObjects
if typeof ole.Object is MSForms.OptionButton then
if lcase(ole.Object.GroupName) = "testing" then
ole.visible = False
end if
end if
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top