Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default True or False for a check box

I have a check box at the top of my sheet. I have a linked cell right next to
it that says either True or False. How can I get that to show different text?
Do I need to assign a macro and if so how would it be written. I want it to
either say "Good" when checked instead of true and "Bad" when unchecked
instead of False.

--
Thank you!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default True or False for a check box

You can paste this in a standard module and assign this macro to the
checkbox. Label the sheet and cell to suit your application. You can also
get rid of the linked cell if you don't need it anymore.

Sub GoodBad()

With Sheets("Sheet1")
If .CheckBoxes("Check Box 4").Value = xlOn Then
.Range("A1").Value = "GOOD"
Else
.Range("A1").Value = "BAD"
End If
End With

End Sub

Hope this helps! If so, please click "YES" below.

--
Cheers,
Ryan


"Doug" wrote:

I have a check box at the top of my sheet. I have a linked cell right next to
it that says either True or False. How can I get that to show different text?
Do I need to assign a macro and if so how would it be written. I want it to
either say "Good" when checked instead of true and "Bad" when unchecked
instead of False.

--
Thank you!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default True or False for a check box

It works great! Do you happen to know though if the original True or False
can be changed or is that standard for a checkbox? Reason I ask is because it
shows the true and false prior to the Macro changing it to Good or Bad?


"Ryan H" wrote:

You can paste this in a standard module and assign this macro to the
checkbox. Label the sheet and cell to suit your application. You can also
get rid of the linked cell if you don't need it anymore.

Sub GoodBad()

With Sheets("Sheet1")
If .CheckBoxes("Check Box 4").Value = xlOn Then
.Range("A1").Value = "GOOD"
Else
.Range("A1").Value = "BAD"
End If
End With

End Sub

Hope this helps! If so, please click "YES" below.

--
Cheers,
Ryan


"Doug" wrote:

I have a check box at the top of my sheet. I have a linked cell right next to
it that says either True or False. How can I get that to show different text?
Do I need to assign a macro and if so how would it be written. I want it to
either say "Good" when checked instead of true and "Bad" when unchecked
instead of False.

--
Thank you!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default True or False for a check box

A checkboxes value will always be True or False or sometimes Null. I
seriously doubt that could be changed. If the true/false bothers you I would
just delete the linked cell property of the checkbox.
--
Cheers,
Ryan


"Doug" wrote:

It works great! Do you happen to know though if the original True or False
can be changed or is that standard for a checkbox? Reason I ask is because it
shows the true and false prior to the Macro changing it to Good or Bad?


"Ryan H" wrote:

You can paste this in a standard module and assign this macro to the
checkbox. Label the sheet and cell to suit your application. You can also
get rid of the linked cell if you don't need it anymore.

Sub GoodBad()

With Sheets("Sheet1")
If .CheckBoxes("Check Box 4").Value = xlOn Then
.Range("A1").Value = "GOOD"
Else
.Range("A1").Value = "BAD"
End If
End With

End Sub

Hope this helps! If so, please click "YES" below.

--
Cheers,
Ryan


"Doug" wrote:

I have a check box at the top of my sheet. I have a linked cell right next to
it that says either True or False. How can I get that to show different text?
Do I need to assign a macro and if so how would it be written. I want it to
either say "Good" when checked instead of true and "Bad" when unchecked
instead of False.

--
Thank you!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default True or False for a check box

Thank you so much. Have a good time with your family for the Christmas Holiday!


"Ryan H" wrote:

A checkboxes value will always be True or False or sometimes Null. I
seriously doubt that could be changed. If the true/false bothers you I would
just delete the linked cell property of the checkbox.
--
Cheers,
Ryan


"Doug" wrote:

It works great! Do you happen to know though if the original True or False
can be changed or is that standard for a checkbox? Reason I ask is because it
shows the true and false prior to the Macro changing it to Good or Bad?


"Ryan H" wrote:

You can paste this in a standard module and assign this macro to the
checkbox. Label the sheet and cell to suit your application. You can also
get rid of the linked cell if you don't need it anymore.

Sub GoodBad()

With Sheets("Sheet1")
If .CheckBoxes("Check Box 4").Value = xlOn Then
.Range("A1").Value = "GOOD"
Else
.Range("A1").Value = "BAD"
End If
End With

End Sub

Hope this helps! If so, please click "YES" below.

--
Cheers,
Ryan


"Doug" wrote:

I have a check box at the top of my sheet. I have a linked cell right next to
it that says either True or False. How can I get that to show different text?
Do I need to assign a macro and if so how would it be written. I want it to
either say "Good" when checked instead of true and "Bad" when unchecked
instead of False.

--
Thank you!

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 box - true/false - i'd like a third option n/a Kelly 1st Excel Discussion (Misc queries) 6 February 24th 10 01:23 PM
Creating a Check Box that produce true or false statement Cyn Excel Programming 2 November 2nd 07 06:11 PM
Check if Conditional Format is True or False / Check cell Color Kevin McCartney Excel Worksheet Functions 5 June 29th 07 11:12 AM
Simple Check Box - without True/False values Lisa Excel Discussion (Misc queries) 5 February 13th 07 04:20 PM
check box - true/false/na Kelly 1st Excel Discussion (Misc queries) 4 July 13th 06 12:44 PM


All times are GMT +1. The time now is 10:21 AM.

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"