ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   clear option buttons **MACRO TWEAK** (https://www.excelbanter.com/excel-programming/383424-clear-option-buttons-%2A%2Amacro-tweak%2A%2A.html)

dan

clear option buttons **MACRO TWEAK**
 
Hello, I have the current macro assigned to clear the contents of
unlocked cells. What I would like to do is also include the clearing
of 2 Option Buttons as well.

Thanks for your assistance!

Private Sub CommandButton1_Click()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.Locked = False Then cell.MergeArea.ClearContents
Next
End Sub


Bob Phillips

clear option buttons **MACRO TWEAK**
 
activesheet.optionButtons("Option Button 1").value=0

--
---
HTH

Bob

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



"Dan" wrote in message
ups.com...
Hello, I have the current macro assigned to clear the contents of
unlocked cells. What I would like to do is also include the clearing
of 2 Option Buttons as well.

Thanks for your assistance!

Private Sub CommandButton1_Click()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.Locked = False Then cell.MergeArea.ClearContents
Next
End Sub





dan

clear option buttons **MACRO TWEAK**
 
On Feb 16, 3:34 pm, "Bob Phillips" wrote:
activesheet.optionButtons("Option Button 1").value=0

--
---
HTH

Bob

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

"Dan" wrote in message

ups.com...



Hello, I have the current macro assigned to clear the contents of
unlocked cells. What I would like to do is also include the clearing
of 2 Option Buttons as well.


Thanks for your assistance!


Private Sub CommandButton1_Click()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.Locked = False Then cell.MergeArea.ClearContents
Next
End Sub- Hide quoted text -


- Show quoted text -


Thanks. Where would I encorporate this command into the macro?


Bob Phillips

clear option buttons **MACRO TWEAK**
 
Depends when you want it cleared, but I would guess after the Next
statement.

--
---
HTH

Bob

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



"Dan" wrote in message
ups.com...
On Feb 16, 3:34 pm, "Bob Phillips" wrote:
activesheet.optionButtons("Option Button 1").value=0

--
---
HTH

Bob

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

"Dan" wrote in message

ups.com...



Hello, I have the current macro assigned to clear the contents of
unlocked cells. What I would like to do is also include the clearing
of 2 Option Buttons as well.


Thanks for your assistance!


Private Sub CommandButton1_Click()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.Locked = False Then cell.MergeArea.ClearContents
Next
End Sub- Hide quoted text -


- Show quoted text -


Thanks. Where would I encorporate this command into the macro?




dan

clear option buttons **MACRO TWEAK**
 
On Feb 17, 3:11 am, "Bob Phillips" wrote:
Depends when you want it cleared, but I would guess after the Next
statement.

--
---
HTH

Bob

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

"Dan" wrote in message

ups.com...



On Feb 16, 3:34 pm, "Bob Phillips" wrote:
activesheet.optionButtons("Option Button 1").value=0


--
---
HTH


Bob


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


"Dan" wrote in message


roups.com...


Hello, I have the current macro assigned to clear the contents of
unlocked cells. What I would like to do is also include the clearing
of 2 Option Buttons as well.


Thanks for your assistance!


Private Sub CommandButton1_Click()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.Locked = False Then cell.MergeArea.ClearContents
Next
End Sub- Hide quoted text -


- Show quoted text -


Thanks. Where would I encorporate this command into the macro?- Hide quoted text -


- Show quoted text -


Cool. Thanks!



All times are GMT +1. The time now is 10:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com