-
Here is an example with a RefEdit control on a User Form.
[vba]
Option Explicit
Private Sub CommandButton1_Click()
Dim Rng As Range
Set Rng = Range(Me.RefEdit1.Value)
Sheet1.OLEObjects.Add "Forms.Checkbox.1", _
Left:=Rng.Left, Top:=Rng.Top, Height:=Rng.Height, Width:=Rng.Width
End Sub
[/vba]
You can then add a Select Case to determine what control to add (based on user input).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules