Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jazzi-D
 
Posts: n/a
Default How do I delete checkboxes from rows I deleted in a macro?

I programmatically delete a named range which contains checkboxes, but after
the rows have been deleted the checkboxes overlay each other and appear in a
blank line. Is there any way to delete the checkboxes as well as the content
of the cells/rows?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How do I delete checkboxes from rows I deleted in a macro?

Maybe you could do something like:

Option Explicit
Sub testme99()
Dim myShape As Shape
Dim myRng As Range
Dim wks As Worksheet

Set wks = Worksheets("Sheet1")

With wks
Set myRng = .Range("g8:k20") 'whatever
For Each myShape In .Shapes
If Intersect(myShape.TopLeftCell, myRng) Is Nothing Then
'don't delete it
Else
myShape.Delete
End If
Next myShape
End With
myRng.Delete shift:=xlUp

End Sub



Jazzi-D wrote:

I programmatically delete a named range which contains checkboxes, but after
the rows have been deleted the checkboxes overlay each other and appear in a
blank line. Is there any way to delete the checkboxes as well as the content
of the cells/rows?


--

Dave Peterson
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
Can I delete blank rows from excel without selecting them? rgtest Excel Worksheet Functions 9 February 14th 09 04:12 PM
Macro Help In Excel welshlad Excel Discussion (Misc queries) 14 October 26th 05 03:34 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 01:22 PM
In a protected worksheet allow users to delete rows Jason Trivett Excel Worksheet Functions 1 July 12th 05 10:50 AM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 09:39 PM


All times are GMT +1. The time now is 06:25 PM.

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"