Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing artifacts from a spreadsheet with VBA
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing artifacts from a spreadsheet with VBA
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/sh...d.php?t=192733 http://www.thecodecage.com/forumz |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing artifacts from a spreadsheet with VBA
Paul,
This did the trick. Thank you very much. It reduced the time it took to process one of my speadsheets that was littlered with "shapes" from over 3 hours to ten minutes! -- Brian McNamee "Paul" wrote: 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/sh...d.php?t=192733 http://www.thecodecage.com/forumz . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Removing trailing spaces in a spreadsheet | Excel Discussion (Misc queries) | |||
Removing blanks from a spreadsheet | Excel Worksheet Functions | |||
Removing records using anther spreadsheet | Excel Discussion (Misc queries) | |||
Removing non text characters from spreadsheet | Excel Discussion (Misc queries) | |||
Removing zero values from a spreadsheet. | Excel Discussion (Misc queries) |