LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Checkbox procedures

Thanks Dave! I believe that I will just link to another cell as you
suggested. Much easier.


"Dave Peterson" wrote:

How about dropping the code and just using a linked cell and then point at that
linked cell.

I dropped a checkbox from the Forms toolbar onto a worksheet.
I rightclicked on that checkbox and chose format control
Then on the control tab, I added an address for the Cell Link. (I used B3, but
you could use any cell you want.)

Then in B4, I put this formula:
=if(b3=true,"YES","")

And I gave B3 a custom format of:
;;;
(3 semicolons, so I couldn't see the True/False in the worksheet.)

=========
If you really, really want code (I wouldn't!)...

You could assign this macro to the checkbox:

Option Explicit
Sub testme01()

Dim myCBX As CheckBox

Set myCBX = ActiveSheet.CheckBoxes(Application.Caller)

If myCBX.Value = xlOn Then
activesheet.range("B4").value = "YES"
Else
activesheet.range("B4").clearcontents
End If

End Sub

rbbbbeee wrote:

I have tried several different things and I don't know alot about checkbox
procedures.
This is what I want to do. I have a checkbox in a worksheet lets say at
cell B3. I want the cell at B4 to contain the word "YES" when the checkbox
is ticked and blank when the box is not ticked.
Could someone please write me the code that will do what I am wanting to do,
then I can expand on it as I need to.

Thanks,
Russ


--

Dave Peterson



 
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
Simplifying numerous checkbox procedures into 1 procedure PJ Murph[_2_] Excel Worksheet Functions 2 March 21st 09 09:32 PM
How to have Checkbox A uncheck with checked Checkbox B Texas Aggie Excel Discussion (Misc queries) 3 July 20th 07 10:58 PM
Get VBA procedures from DB Hiran de Silva[_2_] Excel Programming 3 July 4th 06 05:46 PM
How do I link one checkbox to update another checkbox? Mike Excel Programming 3 April 28th 06 02:22 AM
checkbox on form reset from checkbox on sheet raw[_12_] Excel Programming 1 December 3rd 05 05:08 AM


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