Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel XP SP2
I need to set the LinkedCell property on a control with VB, both fo optionbuttons and checkboxes, but I cannot find a way to access th property in VB (I also want to set the GroupName and Caption, bu assume the answer would be similar). I'm able to set the name (height, width, top, left, etc) with (e.g.): ActiveWorkbook.Worksheets("Sheet1").Shapes("CheckB ox1").Name "Checkbox1Name" but not the other three properties mentioned above. These controls are on a worksheet and not a form, the Help system ha let me down. -s -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With ActiveWorkbook.Worksheets("Sheet1").OleObjects("Ch eckBox1")
.Name = "Checkbox1Name" .LinkedCell = "Sheet3!A1" .Object.Caption = "ABCD: .Object.GroupName = "Group1" End With the linkedcell property is provided by the container which is the OleObject Shape and OleObject share the same name. In xl2000 and later, the checkbox name will also be the OleObject and ShapeName. The caption is a property of the Checkbox, so you have to append .Object to the OleObject to refer to the checkbox. Same for groupname. -- Regards, Tom Ogilvy "scottrell " wrote in message ... Excel XP SP2 I need to set the LinkedCell property on a control with VB, both for optionbuttons and checkboxes, but I cannot find a way to access the property in VB (I also want to set the GroupName and Caption, but assume the answer would be similar). I'm able to set the name (height, width, top, left, etc) with (e.g.): ActiveWorkbook.Worksheets("Sheet1").Shapes("CheckB ox1").Name = "Checkbox1Name" but not the other three properties mentioned above. These controls are on a worksheet and not a form, the Help system has let me down. -sc --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
problem with checkbox control | Excel Worksheet Functions | |||
how do I protect a worksheet and still use a checkbox control | Excel Worksheet Functions | |||
resize control checkbox with cell | Excel Discussion (Misc queries) | |||
Setting LinkedCell of individual OptionButton | Excel Programming | |||
VBA Control Checkbox | Excel Programming |