LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default How do I put a check box in each row of a column

Dave,
That was it. Thanks to you and Biff for the help.

Best,
Keith



"Dave Peterson" wrote:

I've had better luck when the zoom is set to 100%.

Any chance you're not using 100% zoom????

Keith-NB wrote:

Biff,
I used this macro and it worked great, except that by row 130 my checkbox
appears in row 129.

My row heights are consistent 25.50 or 34 pixels.

Is there some adjustment I can make to the macro to correct for this?

Thanks!
Keith

"Biff" wrote:

Here's a macro by Dave Peterson.

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

With ActiveSheet
.CheckBoxes.Delete 'nice for testing
For Each myCell In ActiveSheet.Range("A2:A10").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

Just change the range reference: ("A2:A10") to whatever you want. The macro
also sets the linked cell to be the same cell the checkbox is "in" and sets
the checkstate (TRUE or FALSE) to be "invisible". The Caption is set to no
caption. If you want the same caption in every checkbox you'll have to edit
that line. If you want a different caption in each checkbox then you'll have
to do it manually.

Biff

"SteveK" wrote in message
...
I want to create check boxes for each row in a column. I was wondering if
there is a way to relate the check box to one cell and maybe drag the
bottom
right corner down and have it copy down the row. Is there a way to do this
or
another approach i might be able to use? Thanks ahead of time




--

Dave Peterson

 
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
Copying forumla for vlook up but changing the column Index # klafert Excel Worksheet Functions 21 September 4th 06 07:56 PM
macro unouwanme Excel Discussion (Misc queries) 9 August 31st 06 09:38 PM
Check COlumn - Excel VBA magix Excel Discussion (Misc queries) 11 November 5th 05 02:32 AM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM


All times are GMT +1. The time now is 01:37 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"