LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
PA PA is offline
external usenet poster
 
Posts: 101
Default Macro or VBA Code to un tick CheckBox

Dear Leith,

Thanks you very much for your help.It does work well

Best Regards

PA

"Leith Ross" wrote:

On Jun 17, 10:29 pm, PA wrote:
Dear All,

I have few checkbox at one tab of spreadsheet that assigned with few macro
if I tick that Checkbox.

Now, If I want to untick all that "ticked" Checkbox automatically by using
Macro/vba code, is there any vba code that I can use ?

I try to use macro recording to untick those checkbox, but it does not work.

Highly Appreciate for any comment and help,

Thansk alot,

PA


Hello PA,

Here are 2 macros to do the job. The first macro is for Control
Toolbox CheckBoxes, like the ones on a UserForm, and the Excel
Worksheet only Forms Checkboxes.

'Begin Macro Code...
Sub ClearCheckBoxes1()

' This macro clears all Control Toolbox CheckBoxes on the
ActiveSheet
Dim CB As Object

For Each CB In ActiveSheet.OLEObjects
If TypeName(CB.Object) Like "CheckBox" Then
CB.Object.Value = ""
End If
Next CB

End Sub

Sub ClearCheckBoxes2()

' This macro clears all Forms CheckBoxes on the ActiveSheet
Dim CB As Object

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

End Sub
'End Macro Code

Sincerely,
Leith Ross


 
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
How can I change the tick size in excell checkbox? Warby Excel Discussion (Misc queries) 1 January 2nd 08 04:59 PM
Alternative to a tick in a checkbox Mike Excel Discussion (Misc queries) 1 April 26th 07 09:38 AM
Macro to tick checkbox automatically PaulJ Excel Discussion (Misc queries) 2 March 2nd 06 10:19 AM
Checkbox to be marked with a cross rather than a tick Den New Users to Excel 1 February 22nd 06 10:04 AM
I would like to have a cross in my checkbox rather than a tick Den Excel Programming 5 December 21st 05 06:50 AM


All times are GMT +1. The time now is 08:37 AM.

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"