Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

Clear check box problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dow - 11 Nov 2007 13:42 GMT
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.
Signature

dow

Bob Phillips - 11 Nov 2007 14:05 GMT
Dim cb As CheckBox

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

Signature

HTH

Bob

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

>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
[quoted text clipped - 15 lines]
> my
> first macro which I got from a post.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.