PC Review


Reply
Thread Tools Rate Thread

Click on a cell to get a check mark then...

 
 
=?Utf-8?B?VG9mZXJLaW5n?=
Guest
Posts: n/a
 
      17th Jul 2007
I need to attach some Visual Basic code to a group of cells so the following
will happen.

The group of cells is going to be named ClickRange. In this example, I will
say the range corresponds to cells B3 through B8.

When a user left-clicks on B3 or B4 or B5, etc. I would like a check mark to
appear. (I am thinking that I need to format those cells to Wingdings2 and
when a capital P is typed in them, a check mark will show up.)

If a check mark already exists in the cell, I want the left-click to turn
the check mark off. (I am thinking that the cell.value is deleted.)

Then after the selection process is made by checking the cells on or off, I
want to have the user click on a button at the top of the page that will hide
all the rows that do not have a check mark.

Can you guys help me out here?

Thanks,

Tofer
 
Reply With Quote
 
 
 
 
Vasant Nanavati
Guest
Posts: n/a
 
      17th Jul 2007
You will need a double-click or a right-click. Is that acceptable?
_______________________________________________________________________

"ToferKing" <(E-Mail Removed)> wrote in message
news:CEA315C3-5B31-499F-9386-(E-Mail Removed)...
>I need to attach some Visual Basic code to a group of cells so the
>following
> will happen.
>
> The group of cells is going to be named ClickRange. In this example, I
> will
> say the range corresponds to cells B3 through B8.
>
> When a user left-clicks on B3 or B4 or B5, etc. I would like a check mark
> to
> appear. (I am thinking that I need to format those cells to Wingdings2
> and
> when a capital P is typed in them, a check mark will show up.)
>
> If a check mark already exists in the cell, I want the left-click to turn
> the check mark off. (I am thinking that the cell.value is deleted.)
>
> Then after the selection process is made by checking the cells on or off,
> I
> want to have the user click on a button at the top of the page that will
> hide
> all the rows that do not have a check mark.
>
> Can you guys help me out here?
>
> Thanks,
>
> Tofer



 
Reply With Quote
 
=?Utf-8?B?VG9mZXJLaW5n?=
Guest
Posts: n/a
 
      18th Jul 2007
Yes, that is acceptable.

Also, while I was driving home, it occured to me that I could place a check
mark object in the cell and have them click that object on and off.

So that means that I need a VB code to hide the rows where the check mark
object is not checked.

Tofer

"Vasant Nanavati" wrote:

> You will need a double-click or a right-click. Is that acceptable?
> _______________________________________________________________________
>
> "ToferKing" <(E-Mail Removed)> wrote in message
> news:CEA315C3-5B31-499F-9386-(E-Mail Removed)...
> >I need to attach some Visual Basic code to a group of cells so the
> >following
> > will happen.
> >
> > The group of cells is going to be named ClickRange. In this example, I
> > will
> > say the range corresponds to cells B3 through B8.
> >
> > When a user left-clicks on B3 or B4 or B5, etc. I would like a check mark
> > to
> > appear. (I am thinking that I need to format those cells to Wingdings2
> > and
> > when a capital P is typed in them, a check mark will show up.)
> >
> > If a check mark already exists in the cell, I want the left-click to turn
> > the check mark off. (I am thinking that the cell.value is deleted.)
> >
> > Then after the selection process is made by checking the cells on or off,
> > I
> > want to have the user click on a button at the top of the page that will
> > hide
> > all the rows that do not have a check mark.
> >
> > Can you guys help me out here?
> >
> > Thanks,
> >
> > Tofer

>
>
>

 
Reply With Quote
 
=?Utf-8?B?VG9mZXJLaW5n?=
Guest
Posts: n/a
 
      18th Jul 2007
Yes, that is acceptable.

It also occured to me that I could place a Checkmark Object in the cells and
have them check those on and off.

Then I would need help with the code that is attached to the button at the
top of the page that allows the unchecked rows to disappear.

Tofer

"Vasant Nanavati" wrote:

> You will need a double-click or a right-click. Is that acceptable?
> _______________________________________________________________________
>
> "ToferKing" <(E-Mail Removed)> wrote in message
> news:CEA315C3-5B31-499F-9386-(E-Mail Removed)...
> >I need to attach some Visual Basic code to a group of cells so the
> >following
> > will happen.
> >
> > The group of cells is going to be named ClickRange. In this example, I
> > will
> > say the range corresponds to cells B3 through B8.
> >
> > When a user left-clicks on B3 or B4 or B5, etc. I would like a check mark
> > to
> > appear. (I am thinking that I need to format those cells to Wingdings2
> > and
> > when a capital P is typed in them, a check mark will show up.)
> >
> > If a check mark already exists in the cell, I want the left-click to turn
> > the check mark off. (I am thinking that the cell.value is deleted.)
> >
> > Then after the selection process is made by checking the cells on or off,
> > I
> > want to have the user click on a button at the top of the page that will
> > hide
> > all the rows that do not have a check mark.
> >
> > Can you guys help me out here?
> >
> > Thanks,
> >
> > Tofer

>
>
>

 
Reply With Quote
 
Vasant Nanavati
Guest
Posts: n/a
 
      18th Jul 2007
In the worksheet module:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
If Not Intersect(Target, Range("B3:B8")) Is Nothing Then
If Target = "P" Then
Target = vbNullString
ElseIf Target = vbNullString Then
Target = "P"
Else
End If
End If
End Sub

In the code for the button:

Dim c As Range
For Each c In Range("B3:B8")
If c = "P" Then c.EntireRow.Hidden = True
Next
________________________________________________________________________





"ToferKing" <(E-Mail Removed)> wrote in message
news:A330EF9F-E279-4B4F-814A-(E-Mail Removed)...
> Yes, that is acceptable.
>
> It also occured to me that I could place a Checkmark Object in the cells
> and
> have them check those on and off.
>
> Then I would need help with the code that is attached to the button at the
> top of the page that allows the unchecked rows to disappear.
>
> Tofer
>
> "Vasant Nanavati" wrote:
>
>> You will need a double-click or a right-click. Is that acceptable?
>> _______________________________________________________________________
>>
>> "ToferKing" <(E-Mail Removed)> wrote in message
>> news:CEA315C3-5B31-499F-9386-(E-Mail Removed)...
>> >I need to attach some Visual Basic code to a group of cells so the
>> >following
>> > will happen.
>> >
>> > The group of cells is going to be named ClickRange. In this example, I
>> > will
>> > say the range corresponds to cells B3 through B8.
>> >
>> > When a user left-clicks on B3 or B4 or B5, etc. I would like a check
>> > mark
>> > to
>> > appear. (I am thinking that I need to format those cells to
>> > Wingdings2
>> > and
>> > when a capital P is typed in them, a check mark will show up.)
>> >
>> > If a check mark already exists in the cell, I want the left-click to
>> > turn
>> > the check mark off. (I am thinking that the cell.value is deleted.)
>> >
>> > Then after the selection process is made by checking the cells on or
>> > off,
>> > I
>> > want to have the user click on a button at the top of the page that
>> > will
>> > hide
>> > all the rows that do not have a check mark.
>> >
>> > Can you guys help me out here?
>> >
>> > Thanks,
>> >
>> > Tofer

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?VG9mZXJLaW5n?=
Guest
Posts: n/a
 
      18th Jul 2007
Well, I think I have the code entered properly. It is in the correct place
Worksheet_BeforeDoubleClick, etc.

But when I double-click on the cells in the target range, the system acts
normal (it wants me to enter something in the cell) and when I right-click on
the range the system acts normal (it pops open a menu box.)

Vasant, what am I doing wrong?

Tofer

"Vasant Nanavati" wrote:

> In the worksheet module:
>
> Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
> Boolean)
> Cancel = True
> If Not Intersect(Target, Range("B3:B8")) Is Nothing Then
> If Target = "P" Then
> Target = vbNullString
> ElseIf Target = vbNullString Then
> Target = "P"
> Else
> End If
> End If
> End Sub
>
> In the code for the button:
>
> Dim c As Range
> For Each c In Range("B3:B8")
> If c = "P" Then c.EntireRow.Hidden = True
> Next
> ________________________________________________________________________
>
>
>
>
>
> "ToferKing" <(E-Mail Removed)> wrote in message
> news:A330EF9F-E279-4B4F-814A-(E-Mail Removed)...
> > Yes, that is acceptable.
> >
> > It also occured to me that I could place a Checkmark Object in the cells
> > and
> > have them check those on and off.
> >
> > Then I would need help with the code that is attached to the button at the
> > top of the page that allows the unchecked rows to disappear.
> >
> > Tofer
> >
> > "Vasant Nanavati" wrote:
> >
> >> You will need a double-click or a right-click. Is that acceptable?
> >> _______________________________________________________________________
> >>
> >> "ToferKing" <(E-Mail Removed)> wrote in message
> >> news:CEA315C3-5B31-499F-9386-(E-Mail Removed)...
> >> >I need to attach some Visual Basic code to a group of cells so the
> >> >following
> >> > will happen.
> >> >
> >> > The group of cells is going to be named ClickRange. In this example, I
> >> > will
> >> > say the range corresponds to cells B3 through B8.
> >> >
> >> > When a user left-clicks on B3 or B4 or B5, etc. I would like a check
> >> > mark
> >> > to
> >> > appear. (I am thinking that I need to format those cells to
> >> > Wingdings2
> >> > and
> >> > when a capital P is typed in them, a check mark will show up.)
> >> >
> >> > If a check mark already exists in the cell, I want the left-click to
> >> > turn
> >> > the check mark off. (I am thinking that the cell.value is deleted.)
> >> >
> >> > Then after the selection process is made by checking the cells on or
> >> > off,
> >> > I
> >> > want to have the user click on a button at the top of the page that
> >> > will
> >> > hide
> >> > all the rows that do not have a check mark.
> >> >
> >> > Can you guys help me out here?
> >> >
> >> > Thanks,
> >> >
> >> > Tofer
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
=?Utf-8?B?R3JlZyBXaWxzb24=?=
Guest
Posts: n/a
 
      18th Jul 2007
Do you have macros enabled? To enable:
Tools > Macro > Security > Security Level tab > Medium or Low option.

I have it working fine except I think the logic is reversed. I believe the
blank cells should be hidden instead of those with the letter "P". I think
you would want to toggle the row hidden status instead of just hiding them.
Also, I would go with Marlett font using lower case "a", say font size 10
with vertical and horizontal alignment set to Center.

Greg

"ToferKing" wrote:

> Well, I think I have the code entered properly. It is in the correct place
> Worksheet_BeforeDoubleClick, etc.
>
> But when I double-click on the cells in the target range, the system acts
> normal (it wants me to enter something in the cell) and when I right-click on
> the range the system acts normal (it pops open a menu box.)
>
> Vasant, what am I doing wrong?
>
> Tofer
>
> "Vasant Nanavati" wrote:
>
> > In the worksheet module:
> >
> > Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
> > Boolean)
> > Cancel = True
> > If Not Intersect(Target, Range("B3:B8")) Is Nothing Then
> > If Target = "P" Then
> > Target = vbNullString
> > ElseIf Target = vbNullString Then
> > Target = "P"
> > Else
> > End If
> > End If
> > End Sub
> >
> > In the code for the button:
> >
> > Dim c As Range
> > For Each c In Range("B3:B8")
> > If c = "P" Then c.EntireRow.Hidden = True
> > Next
> > ________________________________________________________________________
> >
> >
> >
> >
> >
> > "ToferKing" <(E-Mail Removed)> wrote in message
> > news:A330EF9F-E279-4B4F-814A-(E-Mail Removed)...
> > > Yes, that is acceptable.
> > >
> > > It also occured to me that I could place a Checkmark Object in the cells
> > > and
> > > have them check those on and off.
> > >
> > > Then I would need help with the code that is attached to the button at the
> > > top of the page that allows the unchecked rows to disappear.
> > >
> > > Tofer
> > >
> > > "Vasant Nanavati" wrote:
> > >
> > >> You will need a double-click or a right-click. Is that acceptable?
> > >> _______________________________________________________________________
> > >>
> > >> "ToferKing" <(E-Mail Removed)> wrote in message
> > >> news:CEA315C3-5B31-499F-9386-(E-Mail Removed)...
> > >> >I need to attach some Visual Basic code to a group of cells so the
> > >> >following
> > >> > will happen.
> > >> >
> > >> > The group of cells is going to be named ClickRange. In this example, I
> > >> > will
> > >> > say the range corresponds to cells B3 through B8.
> > >> >
> > >> > When a user left-clicks on B3 or B4 or B5, etc. I would like a check
> > >> > mark
> > >> > to
> > >> > appear. (I am thinking that I need to format those cells to
> > >> > Wingdings2
> > >> > and
> > >> > when a capital P is typed in them, a check mark will show up.)
> > >> >
> > >> > If a check mark already exists in the cell, I want the left-click to
> > >> > turn
> > >> > the check mark off. (I am thinking that the cell.value is deleted.)
> > >> >
> > >> > Then after the selection process is made by checking the cells on or
> > >> > off,
> > >> > I
> > >> > want to have the user click on a button at the top of the page that
> > >> > will
> > >> > hide
> > >> > all the rows that do not have a check mark.
> > >> >
> > >> > Can you guys help me out here?
> > >> >
> > >> > Thanks,
> > >> >
> > >> > Tofer
> > >>
> > >>
> > >>

> >
> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Click on a cell and have check mark displayed in MS Excel ogopogo5 Microsoft Excel Programming 2 22nd Aug 2008 08:41 AM
Increase size of a Forms Check Box (click on to enter check mark) =?Utf-8?B?NzE4U2F0b3NoaQ==?= Microsoft Excel Misc 0 17th Aug 2007 01:52 AM
Re: check box, so when you click on it it inserts a check mark into t. Dave Peterson Microsoft Excel Misc 0 13th Apr 2005 09:12 PM
Re: check box, so when you click on it it inserts a check mark into t. Dave Peterson Microsoft Excel Misc 0 13th Apr 2005 09:12 PM
How do make a cell show a check mark on 'click' =?Utf-8?B?TWljaGVsbGU=?= Microsoft Excel Misc 6 17th Jan 2004 08:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:14 PM.