ChecK Boxes

  • Thread starter Thread starter robertguy
  • Start date Start date
R

robertguy

Hi,

can anyone help me please as I need some advice with check boxes.

I'm trying to write a simple shopping list where by I check a check bo
of the items I require and then filter the ones selected.

e.g


bread x
milk
butter x
etc
etc


then perform the filter to display the selected items

bread x
butter x


I have had a quick play and another problem I have is locking the chec
box to the actually cell as if the cells width/height is changed th
check boxes remains where its was originally



any help would be greatly appreciated



Many thanks



Ro
 
Hi Robert,

Here is a solution that doesn't use a checkbox, but does put a check mark in
the column. Just copy the code into the worksheet code module (right-click
on the sheet name tab, select View Code, and paste the code in). Try it!

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With Target
If .Column = 1 Then
If .Value = "a" Then
.Value = ""
.Font.Name = "Arial"
.Offset(0, 1).Value = ""
Else
.Value = "a"
.Font.Name = "Marlett"
.Offset(0, 1).Value = Format(Date, "dd mmm yyyy")
End If
.Offset(0, 1).Activate
End If
End With
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi Rob

You can't really do that. Objects are not within the cells, they float on
top on the so called "drawing layer". You are better off putting an X (or
whatever, formatted with a symbol font perhaps) directly into the cells and
use the built-in Autofilter.

HTH. Best wishes Harald
 
Rather than go through the trouble of check boxes, insert
an "X" (as in your example) next to the items. Then apply
an Autofilter (Data > Filter > AutoFilter). In the drop-
down list for the columns of X's, select "X".

HTH
Jason
Atlanta, GA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Graph Autorange 2
Capturing Trend Data over time 1
delete caption on multiple check boxes 2
Check box = 1 2
Are you wasting food? 18
Check Box & Filter or not 2
Can a Macro override sheet Protection? 6
check box 1

Back
Top