Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
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
Removing trailing spaces in a spreadsheet Kamran Excel Discussion (Misc queries) 6 December 8th 06 09:40 PM
Removing blanks from a spreadsheet Niels Jonker Excel Worksheet Functions 2 August 8th 06 07:58 AM
Removing records using anther spreadsheet Gopher_By_Fende Excel Discussion (Misc queries) 3 June 13th 06 11:03 AM
Removing non text characters from spreadsheet Katie59 Excel Discussion (Misc queries) 3 March 23rd 06 05:16 PM
Removing zero values from a spreadsheet. Red1014 Excel Discussion (Misc queries) 3 February 1st 06 05:01 PM


All times are GMT +1. The time now is 07:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"