Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dow dow is offline
external usenet poster
 
Posts: 7
Default Clear check box problem

I have added check boxes to an Excel 2003 spread sheet. I used the Forms
Toolbar. There is an existing Clear button that clears selected cells. I want
to modify the Clear button macro so that the check boxes are cleared also. I
tried to use the code from a previous post (Kyla 4/26), but it didn't work.
Below is the code for the Clear button:

Private Sub Button1_Click()
Range("L9,J12,F14,F15,F16,L19").Select
Selection.ClearContents
Range("l9").Select

End Sub

I am a novice and know next to nothing about macros. The Clear button is my
first macro which I got from a post.
--
dow
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Clear check box problem

Dim cb As CheckBox

For Each cb In ActiveSheet.CheckBoxes
cb.Value = False
Next cb


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"dow" wrote in message
...
I have added check boxes to an Excel 2003 spread sheet. I used the Forms
Toolbar. There is an existing Clear button that clears selected cells. I
want
to modify the Clear button macro so that the check boxes are cleared also.
I
tried to use the code from a previous post (Kyla 4/26), but it didn't
work.
Below is the code for the Clear button:

Private Sub Button1_Click()
Range("L9,J12,F14,F15,F16,L19").Select
Selection.ClearContents
Range("l9").Select

End Sub

I am a novice and know next to nothing about macros. The Clear button is
my
first macro which I got from a post.
--
dow



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
Clear check box macro Kyla Dockery Excel Programming 8 August 5th 09 03:14 PM
excel check register template. How to put symbol in clear column billyjpoohbah Excel Discussion (Misc queries) 1 July 26th 07 11:24 PM
Clear All Check Boxes Steve C Excel Programming 5 March 15th 07 09:38 PM
Using a Macro to clear out check box seletions Mel Excel Worksheet Functions 5 May 20th 05 08:35 PM
how clear up this problem Matthew Kramer Excel Programming 1 September 30th 04 10:58 AM


All times are GMT +1. The time now is 05:19 PM.

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"