PC Review


Reply
Thread Tools Rate Thread

Clear check box problem

 
 
=?Utf-8?B?ZG93?=
Guest
Posts: n/a
 
      11th Nov 2007
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      11th Nov 2007
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" <(E-Mail Removed)> wrote in message
news:0B89EC93-15FB-4A3E-BE05-(E-Mail Removed)...
>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 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
Check and clear Multiple check boxes Dean Microsoft Excel Programming 4 1st Apr 2010 04:32 PM
Clear Check Box terilad Microsoft Excel Programming 2 25th Feb 2010 02:58 PM
Re: Clear check boxes? Dave Peterson Microsoft Excel Programming 0 1st Dec 2009 08:12 PM
Clear All Check Boxes =?Utf-8?B?U3RldmUgQw==?= Microsoft Excel Programming 5 15th Mar 2007 09:38 PM
Clear Yes / No Check box Lenney97@yahoo.com Microsoft Access 3 5th Jan 2007 08:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:29 PM.