Prev: Code running slowly
Next: chr$
From: Brian E McNamee on 3 Apr 2010 16:41 I copy excerpts of HTML tables into spreadsheets and get "artifacts" some of which respond to clicking to select and then using DELETE or CUT. When the cell/row they're in is deleted they migrate to the adjcent row/cell. How can I identify and remove these with VBA? I've tried to "Record Macro" to see what the genie does, but all he says is: "Selection.Delete" and that doesn't tell me what was selected! So, it's useless to include it in my code. I want to get rid of them because the really drag in a lot of something that slows down processing on the sheet and fattens it considerably! -- Brian McNamee
From: Paul on 3 Apr 2010 16:55 Brian, try this code: Code: -------------------- Sub removeShapes() Dim sh As Shape For Each sh In ActiveSheet.Shapes sh.Delete Next sh End Sub -------------------- -- Paul - Paul ------------------------------------------------------------------------ Paul's Profile: 1697 View this thread: http://www.thecodecage.com/forumz/showthread.php?t=192733 http://www.thecodecage.com/forumz
|
Pages: 1 Prev: Code running slowly Next: chr$ |