Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 'Uncheck button'

I've made an 'uncheck button' within Excel... I want this button to remove
all checkboxes on the page. How would I go about doing this? There are 112
checkboxes in which the button would need to remove.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 'Uncheck button'

sorry for the double post - my browser crashed mid-post!

"FuriaRi0T" wrote:

I've made an 'uncheck button' within Excel... I want this button to remove
all checkboxes on the page. How would I go about doing this? There are 112
checkboxes in which the button would need to remove.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default 'Uncheck button'

Do you mean that you want to remove the check boxes altogether or simply
remove the check mark from the boxes?
--
Regards,

OssieMac


"FuriaRi0T" wrote:

sorry for the double post - my browser crashed mid-post!

"FuriaRi0T" wrote:

I've made an 'uncheck button' within Excel... I want this button to remove
all checkboxes on the page. How would I go about doing this? There are 112
checkboxes in which the button would need to remove.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 'Uncheck button'

Just the checkmark itself, not the actual boxes.

"OssieMac" wrote:

Do you mean that you want to remove the check boxes altogether or simply
remove the check mark from the boxes?
--
Regards,

OssieMac


"FuriaRi0T" wrote:

sorry for the double post - my browser crashed mid-post!

"FuriaRi0T" wrote:

I've made an 'uncheck button' within Excel... I want this button to remove
all checkboxes on the page. How would I go about doing this? There are 112
checkboxes in which the button would need to remove.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default 'Uncheck button'

On Jul 26, 8:52 pm, FuriaRi0T
wrote:
Just the checkmark itself, not the actual boxes.

"OssieMac" wrote:
Do you mean that you want to remove the check boxes altogether or simply
remove the check mark from the boxes?
--
Regards,


OssieMac


"FuriaRi0T" wrote:


sorry for the double post - my browser crashed mid-post!


"FuriaRi0T" wrote:


I've made an 'uncheck button' within Excel... I want this button to remove
all checkboxes on the page. How would I go about doing this? There are 112
checkboxes in which the button would need to remove.


Hello FuriaRiOT,

If the Check Boxes are the Forms type and located on the same
worksheet then you can attach this macro to your button. Copy this
code to a standard VBA module in your workbook's VBA project.

Sub ClearCheckBoxes()

Dim ChkBox As Object

For Each ChkBox In ActiveSheet.CheckBoxes
ChkBox.Value = xlOff
Next ChkBox

End Sub

Sincerely,
Leith Ross


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 'Uncheck button'

It doesn't appear to have worked. If I'm supposed to manipulate the code in
someway, pardon my 'green horn'ness, but I'm not sure how.

"Leith Ross" wrote:

On Jul 26, 8:52 pm, FuriaRi0T
wrote:
Just the checkmark itself, not the actual boxes.

"OssieMac" wrote:
Do you mean that you want to remove the check boxes altogether or simply
remove the check mark from the boxes?
--
Regards,


OssieMac


"FuriaRi0T" wrote:


sorry for the double post - my browser crashed mid-post!


"FuriaRi0T" wrote:


I've made an 'uncheck button' within Excel... I want this button to remove
all checkboxes on the page. How would I go about doing this? There are 112
checkboxes in which the button would need to remove.


Hello FuriaRiOT,

If the Check Boxes are the Forms type and located on the same
worksheet then you can attach this macro to your button. Copy this
code to a standard VBA module in your workbook's VBA project.

Sub ClearCheckBoxes()

Dim ChkBox As Object

For Each ChkBox In ActiveSheet.CheckBoxes
ChkBox.Value = xlOff
Next ChkBox

End Sub

Sincerely,
Leith Ross

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default 'Uncheck button'

If you used ActiveX checkboxes then this:-

Sub UnCheckBoxesActiveX()

Dim objChkBox As OLEObject
With Sheets("Sheet1")
For Each objChkBox In .OLEObjects
If TypeName(objChkBox.Object) = "CheckBox" Then
objChkBox.Object.Value = False
End If
Next
End With
End Sub


--
Regards,

OssieMac


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 'Uncheck button'

Thank you very much Ossie. Worked like a dream.

"OssieMac" wrote:

If you used ActiveX checkboxes then this:-

Sub UnCheckBoxesActiveX()

Dim objChkBox As OLEObject
With Sheets("Sheet1")
For Each objChkBox In .OLEObjects
If TypeName(objChkBox.Object) = "CheckBox" Then
objChkBox.Object.Value = False
End If
Next
End With
End Sub


--
Regards,

OssieMac


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 'Uncheck button'

If the Check Boxes are the Forms type and located on the same
worksheet then you can attach this macro to your button. Copy this
code to a standard VBA module in your workbook's VBA project.

Sub ClearCheckBoxes()

Dim ChkBox As Object

For Each ChkBox In ActiveSheet.CheckBoxes
ChkBox.Value = xlOff
Next ChkBox

End Sub


Apparently the OP's CheckBoxes were ActiveX ones as he thank OssieMac for
his code; however, for your future reference, with CheckBoxes from the Forms
toolbar, you don't have to iterate each CheckBox individually to uncheck
them all, you can do it by executing a single line of code....

Sub ClearCheckBoxes()
ActiveSheet.CheckBoxes.Value = xlOff
End Sub

or, if on a sheet other than the ActiveSheet (Sheet1 for example)...

Sub ClearCheckBoxes()
Worksheets("Sheet1").CheckBoxes.Value = xlOff
End Sub

Rick

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
'Uncheck button' FuriaRi0T Excel Programming 1 July 28th 08 06:08 AM
Uncheck every Check Box Q Sean Excel Programming 9 February 16th 08 12:20 AM
Uncheck a box Pietro Excel Discussion (Misc queries) 4 August 29th 07 11:48 AM
did I uncheck something?!?! Susan Excel Programming 6 November 27th 06 03:28 PM
Check / Uncheck Box Navy Chief Setting up and Configuration of Excel 1 October 3rd 05 01:54 AM


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