Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 12 May, 21:11, merjet wrote:
Here is a macro that puts CheckBoxes in cells A1:A10 of Sheet1 and makes B1:B10 the LinkedCells. Modify to suit. Hth, Merjet Sub Macro1() Dim ws As Worksheet Set ws = Sheets("Sheet1") Set rng = ws.Range("A1:A10") For Each c In rng With ws.OLEObjects.Add( _ ClassType:="Forms.CheckBox.1", _ Link:=False, _ DisplayAsIcon:=False, _ Left:=c.Left, _ Top:=c.Top, _ Width:=c.Width, _ Height:=c.Height) .Object.Caption = "" .LinkedCell = c.Offset(0, 1).Address .Object.Value = False End With Next c End Sub This is cool, thanks so much. It solved a lot of problems and my time from manually creating check boxes. good work! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple checkboxes and aligning | Excel Discussion (Misc queries) | |||
Multiple Checkboxes | Excel Discussion (Misc queries) | |||
Multiple Checkboxes Shortcut? | Excel Discussion (Misc queries) | |||
Multiple checkboxes, one macro? | Excel Programming | |||
Multiple checkboxes 1 macro | Excel Programming |