Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default delete caption on multiple check boxes

Thanks very much for the quick reply! That worked beautifully, thanks again!

"Jacob Skaria" wrote:

Try the below

Sub addCBX()
Dim myCBX As CheckBox
Dim myCell As Range

With ActiveSheet
.CheckBoxes.Delete 'nice for testing
For Each myCell In ActiveSheet.Range("c2:c1000").Cells
With myCell
Set myCBX = .Parent.CheckBoxes.Add _
(Top:=.Top, Width:=.Width, _
Left:=.Left, Height:=.Height)

With myCBX
.LinkedCell = myCell.Address(external:=True)
.Caption = ""
.Width = .Height
.Left = .Left + (myCell.Width / 2) - (.Width / 2)
End With
.NumberFormat = ";;;"
End With
Next myCell
End With
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"confused??" wrote:

I would like to add multiple check boxes (up to 1000) and link each check box
to it's corresponding cell as well as deleting the caption beside each check
box and have the check boxes centred in the cells.

Can anyone help me?

This is what i have so far but i can't work out how to delete the captions
and centre the checkboxes:

Sub addCBX()
Dim myCBX As CheckBox
Dim myCell As Range

With ActiveSheet
.CheckBoxes.Delete 'nice for testing
For Each myCell In ActiveSheet.Range("c2:c1000").Cells
With myCell
Set myCBX = .Parent.CheckBoxes.Add _
(Top:=.Top, Width:=.Width, _
Left:=.Left, Height:=.Height)
With myCBX
.LinkedCell = myCell.Address(external:=True)
'..Caption = "" 'or whatever you want
'.Name = "CBX_" & myCell.Address(0, 0)
End With
.NumberFormat = ";;;"
End With
Next myCell
End With
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Check Boxes Karen Excel Discussion (Misc queries) 3 June 18th 08 09:31 PM
delete check boxes Beans Excel Discussion (Misc queries) 2 April 10th 08 07:52 PM
How do I delete an already created series of check boxes? Tony Excel Discussion (Misc queries) 2 July 5th 07 09:52 PM
Macros to delete check boxes GWB Direct Excel Discussion (Misc queries) 23 June 3rd 05 09:56 PM
how to incert multiple check boxes in excel AnneW Excel Worksheet Functions 1 November 19th 04 06:50 PM


All times are GMT +1. The time now is 12:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"