Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Simple Checkbox Question

You might want to add that for your solution she should also eliminate the
VBA code or the formula will be overwritten when the checkbox is unchecked.

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
Hi Teresa,

No worries, I often feel like that :-)

Let's assume that it is a forms checkbox (tell me if not). Go to the
checkbox and right-click it. Select the 'Format Control' menu option, and
then the Control tab. In the Cell Link box, put a cell reference in there
and OK out. If you check/uncheck the box, you will see it update your

cell.

Okay, let's assume that you linked to cell H1. In cell I6 add this formula

=IF(H1=TRUE,K33,0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"teresa" wrote in message
...
Sorry Bob - I didnt understand your response

"Bob Phillips" wrote:

Link the checkbox to a cell, and add a worksheet formula to test that

linked
cell.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"teresa" wrote in message
...
Hi - this sort of works, however if the checkbox is ticked and I
then change the value in K33, l6 doesnt change in tandem,
I have to untick and then tick again - think an extra line is needed
Thanks A Lot for any help

Sub checkbox1_click()

If CheckBox1.Value Then
Range("l6") = Range("k33")
Else
Range("l6") = 0
End If
End Sub








  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Simple Checkbox Question

Tom,

I don't think I will bother, your solution is so much better.

Bob


"Tom Ogilvy" wrote in message
...
You might want to add that for your solution she should also eliminate the
VBA code or the formula will be overwritten when the checkbox is

unchecked.

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
Hi Teresa,

No worries, I often feel like that :-)

Let's assume that it is a forms checkbox (tell me if not). Go to the
checkbox and right-click it. Select the 'Format Control' menu option,

and
then the Control tab. In the Cell Link box, put a cell reference in

there
and OK out. If you check/uncheck the box, you will see it update your

cell.

Okay, let's assume that you linked to cell H1. In cell I6 add this

formula

=IF(H1=TRUE,K33,0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"teresa" wrote in message
...
Sorry Bob - I didnt understand your response

"Bob Phillips" wrote:

Link the checkbox to a cell, and add a worksheet formula to test

that
linked
cell.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"teresa" wrote in message
...
Hi - this sort of works, however if the checkbox is ticked and I
then change the value in K33, l6 doesnt change in tandem,
I have to untick and then tick again - think an extra line is

needed
Thanks A Lot for any help

Sub checkbox1_click()

If CheckBox1.Value Then
Range("l6") = Range("k33")
Else
Range("l6") = 0
End If
End Sub










  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Simple Checkbox Question

I wouldn't be so quick to discount your solution. In her lastest post, she
wants to handle 20 checkboxes, so a none programming solution might be in
order. I provided a link to Walkenbach's class approach, but based on past
postings, I don't know if that will be an option.

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
Tom,

I don't think I will bother, your solution is so much better.

Bob


"Tom Ogilvy" wrote in message
...
You might want to add that for your solution she should also eliminate

the
VBA code or the formula will be overwritten when the checkbox is

unchecked.

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
Hi Teresa,

No worries, I often feel like that :-)

Let's assume that it is a forms checkbox (tell me if not). Go to the
checkbox and right-click it. Select the 'Format Control' menu option,

and
then the Control tab. In the Cell Link box, put a cell reference in

there
and OK out. If you check/uncheck the box, you will see it update your

cell.

Okay, let's assume that you linked to cell H1. In cell I6 add this

formula

=IF(H1=TRUE,K33,0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"teresa" wrote in message
...
Sorry Bob - I didnt understand your response

"Bob Phillips" wrote:

Link the checkbox to a cell, and add a worksheet formula to test

that
linked
cell.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"teresa" wrote in message
...
Hi - this sort of works, however if the checkbox is ticked and I
then change the value in K33, l6 doesnt change in tandem,
I have to untick and then tick again - think an extra line is

needed
Thanks A Lot for any help

Sub checkbox1_click()

If CheckBox1.Value Then
Range("l6") = Range("k33")
Else
Range("l6") = 0
End If
End Sub












  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Simple Checkbox Question

I think it should be, I thought the same about it. I think it is beyond
Teresa's capabilities though, so I have given her some code adapted to WS
checkboxes.

Regards

Bob


"Tom Ogilvy" wrote in message
...
I wouldn't be so quick to discount your solution. In her lastest post,

she
wants to handle 20 checkboxes, so a none programming solution might be in
order. I provided a link to Walkenbach's class approach, but based on

past
postings, I don't know if that will be an option.

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
Tom,

I don't think I will bother, your solution is so much better.

Bob


"Tom Ogilvy" wrote in message
...
You might want to add that for your solution she should also eliminate

the
VBA code or the formula will be overwritten when the checkbox is

unchecked.

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
Hi Teresa,

No worries, I often feel like that :-)

Let's assume that it is a forms checkbox (tell me if not). Go to the
checkbox and right-click it. Select the 'Format Control' menu

option,
and
then the Control tab. In the Cell Link box, put a cell reference in

there
and OK out. If you check/uncheck the box, you will see it update

your
cell.

Okay, let's assume that you linked to cell H1. In cell I6 add this

formula

=IF(H1=TRUE,K33,0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"teresa" wrote in message
...
Sorry Bob - I didnt understand your response

"Bob Phillips" wrote:

Link the checkbox to a cell, and add a worksheet formula to test

that
linked
cell.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"teresa" wrote in message
...
Hi - this sort of works, however if the checkbox is ticked and

I
then change the value in K33, l6 doesnt change in tandem,
I have to untick and then tick again - think an extra line is

needed
Thanks A Lot for any help

Sub checkbox1_click()

If CheckBox1.Value Then
Range("l6") = Range("k33")
Else
Range("l6") = 0
End If
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
how do I insert simple checkbox which can be checked by a click? mgreen74 Excel Discussion (Misc queries) 5 August 19th 09 04:31 PM
Inserting a simple checkbox that can be checked Phrank Excel Discussion (Misc queries) 4 May 17th 07 06:02 PM
Simple Checkbox Message Code nemadrias Excel Discussion (Misc queries) 10 June 21st 06 08:59 PM
Simple Checkbox Question Tom Ogilvy Excel Programming 0 February 3rd 05 06:36 PM
Simple hiding columns with vba does not work with a checkbox Brian Excel Programming 3 January 9th 04 10:39 PM


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