Hi;
I'm trying to modify a macro that will:
Any help on this would be greatly appreciated.
Thanks
I'm trying to modify a macro that will:
- create an activeX checkbox in a cell range
- Link the checkbox to the relevent cell
- Change the background of the checkbox to transparent
- Change the object position to "Move and size with cells"
Code:
Sub ActX_Add_Multiple_CheckBox_Ex2()
'Disable Screen Update
Application.ScreenUpdating = False
'Variable Declaration
Dim Rng As Range
Dim ShtRng As Range
Dim WrkSht As Worksheet
Set ShtRng = Application.Selection
Set ShtRng = Application.InputBox("Range", "Analysistabs", ShtRng.Address, Type:=8)
Set WrkSht = Application.ActiveSheet
For Each Rng In ShtRng
WrkSht.OLEObjects.Add "Forms.CheckBox.1", Left:=Rng.Left, Top:=Rng.Top, Width:=Rng.Width, Height:=Rng.Height
Next
ShtRng.ClearContents
ShtRng.Select
'Enable Screen Update
Application.ScreenUpdating = True
End Sub
Any help on this would be greatly appreciated.
Thanks