Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Place a check box at a particular cell

hi,
i'd like somebody to help me for writing a macro to generate a checkbox in a
cell on click of a button.able to add a check box but it is not falling
sequentially in the alternate rows..please somebody help me...i am new to
excel..
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Place a check box at a particular cell

you could try this solution that I came up with a while back. This is a copy
of that post

Another way is to use this technique of having a check column, and
monitoring it with a worksheet selection change event. Add your code as
needed.

Rather than use a checkbox, I suggest just using a check column. So if we
assume that the data is in A1:E100 (change to suit), clicking in column A
will do what you want with this code.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
With Target
If .Value = "a" Then
.Value = ""
Else
.Value = "a"
.Font.Name = "Marlett"
End If
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

--

HTH

RP

"poor programmer" <poor wrote in
message ...
hi,
i'd like somebody to help me for writing a macro to generate a checkbox in

a
cell on click of a button.able to add a check box but it is not falling
sequentially in the alternate rows..please somebody help me...i am new to
excel..



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Place a check box at a particular cell


Hi,
Using the fine example noted above as a base, is there an extension t
that code that would allow multiple marks with additional clicks? Fo
example, clicking once yields an X. With that X in the box, the nex
click would produce an O. Clicking again would give a third mark etc
Of course, the produced mark would be dependent on font.

Thanks

Jo

--
josephrowa
-----------------------------------------------------------------------
josephrowan's Profile: http://www.excelforum.com/member.php...fo&userid=1440
View this thread: http://www.excelforum.com/showthread.php?threadid=26999

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
check or uncheck a check box based on a cell value RTKCPA Excel Discussion (Misc queries) 1 February 3rd 10 03:11 PM
Copy and move check box (check boxes) with new cell link? Marty Excel Worksheet Functions 1 January 20th 10 07:43 PM
Check if Conditional Format is True or False / Check cell Color Kevin McCartney Excel Worksheet Functions 5 June 29th 07 11:12 AM
How do I create a small box I can place a check mark in? PAM Excel Discussion (Misc queries) 8 November 7th 05 01:46 PM
How can I place check mark Paul T Excel Discussion (Misc queries) 2 October 3rd 05 04:25 PM


All times are GMT +1. The time now is 03:24 PM.

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

About Us

"It's about Microsoft Excel"