Buttons

  • Thread starter Thread starter Freightdog
  • Start date Start date
F

Freightdog

Hello all,
when inserting an "option button" is there any way to simply place it in a
cell without having to manually size it, move it, etc? Ideally I'd love to
simply be able to click on a cell and say "insert button" or something
similar....

thanks to all

glen
 
Glen

You could use a macro like this

Sub InsertOB()

If TypeName(Selection) = "Range" Then
Selection.Parent.OLEObjects.Add _
(classtype:="Forms.OptionButton.1", _
Left:=ActiveCell.Left, _
Top:=ActiveCell.Top, _
Width:=ActiveCell.Width, _
Height:=ActiveCell.Height) _
.Visible = True
End If

End Sub
 

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

Back
Top