PC Review


Reply
Thread Tools Rate Thread

clear option buttons **MACRO TWEAK**

 
 
Dan
Guest
Posts: n/a
 
      16th Feb 2007
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

 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      16th Feb 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>




 
Reply With Quote
 
Dan
Guest
Posts: n/a
 
      17th Feb 2007
On Feb 16, 3:34 pm, "Bob Phillips" <bob....@xxxx.com> 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" <dan.ga...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
>
>
> > 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?

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      17th Feb 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Feb 16, 3:34 pm, "Bob Phillips" <bob....@xxxx.com> 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" <dan.ga...@gmail.com> wrote in message
>>
>> news:(E-Mail Removed)...
>>
>>
>>
>> > 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?
>



 
Reply With Quote
 
Dan
Guest
Posts: n/a
 
      19th Feb 2007
On Feb 17, 3:11 am, "Bob Phillips" <bob....@xxxx.com> 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" <dan.ga...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
>
>
> > On Feb 16, 3:34 pm, "Bob Phillips" <bob....@xxxx.com> 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" <dan.ga...@gmail.com> wrote in message

>
> >>news:(E-Mail Removed)...

>
> >> > 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!

 
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
TRUE/FALSE MACRO using Option Buttons Jase Microsoft Excel Misc 1 28th Mar 2008 09:15 PM
Option buttons can appear clear from the start? Robert Microsoft Access Forms 4 25th Dec 2007 04:52 AM
UserForms: Clear all Option Buttons =?Utf-8?B?U2hhd24=?= Microsoft Excel Programming 2 19th May 2007 11:29 AM
Option Buttons with macro and working with 2 workbooks =?Utf-8?B?UmVu?= Microsoft Excel Programming 0 26th Jul 2006 08:11 PM
Clear Option Buttons =?Utf-8?B?YWZ0M3JnbDB3?= Microsoft Access Form Coding 2 6th Jul 2006 08:31 PM


Features
 

Advertising
 

Newsgroups
 


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