col1, col2, and col3 need to be numbers or defined someplace in the code.
col should be 1 for Col A, 2 for Col B .......
"(E-Mail Removed)" wrote:
> On Nov 20, 12:31 pm, Joel <J...@discussions.microsoft.com> wrote:
> > Sub DeleteCheckboxes()
> > Dim CBox As CheckBox
> > Const col As Long = 1 '<<==== (Column A) CHANGE
> >
> > For Each CBox In ActiveSheet.CheckBoxes
> > select case CBox.TopLeftCell.Column
> > Case col1, col2, col3
> > CBox.Delete
> >
> > end select
> > Next
> >
> > End Sub
> >
> > "hovio...@yahoo.com" wrote:
> > > Hello, all.
> >
> > > I was successful in deleting check boxes from a worksheet column by
> > > using:
> >
> > > Sub DeleteCheckboxes()
> > > Dim CBox As CheckBox
> > > Const col As Long = 1 '<<==== (Column A) CHANGE
> >
> > > For Each CBox In ActiveSheet.CheckBoxes
> > > If CBox.TopLeftCell.Column = col Then
> > > CBox.Delete
> > > End If
> > > Next
> >
> > > End Sub
> >
> > > HOWEVER, I would like to delete several columns or a range at one
> > > time. Can someone put me on the right track? Thank you!
>
> Thanks, Joel.
>
> I am using your code to test some worksheets but can't seem to get
> this to work yet. I will play around with it some more.
>
|