PC Review


Reply
Thread Tools Rate Thread

Deleting rows from all sheets in an array?

 
 
=?Utf-8?B?QVZS?=
Guest
Posts: n/a
 
      31st Jan 2007
I am trying to delete the same specified rows from a each sheet within a
collection of sheets in a workbook. Using code analogous to the following,
I'm getting a error.
If this is incorrect, is there a way to do it without actually "selecting"
the different sheets?

Sheets(Array("A", "B","C","D","E","F") ).Rows("5:10").Delete

Thanks
 
Reply With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      31st Jan 2007
Hi AVR

Try this

Dim sh As Worksheet
For Each sh In Sheets(Array("A", "B", "C", "D", "E", "F"))
sh.Rows("5:10").Delete
Next sh


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"AVR" <(E-Mail Removed)> wrote in message news:8CD69E06-3F01-43FC-B9B9-(E-Mail Removed)...
>I am trying to delete the same specified rows from a each sheet within a
> collection of sheets in a workbook. Using code analogous to the following,
> I'm getting a error.
> If this is incorrect, is there a way to do it without actually "selecting"
> the different sheets?
>
> Sheets(Array("A", "B","C","D","E","F") ).Rows("5:10").Delete
>
> Thanks

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting all rows in all sheets Jodie Microsoft Excel Programming 4 9th Nov 2009 05:18 PM
Deleting rows from mutliple sheets diba Microsoft Excel Programming 1 16th Aug 2007 05:57 PM
Updating, Deleting and inserting rows over two Excel Sheets Dilip Mistry Microsoft Excel Worksheet Functions 0 25th Jul 2005 07:09 PM
Updating, Deleting and inserting rows over two Excel Sheets mem Microsoft Excel Discussion 2 25th Jul 2005 12:48 PM
Deleting rows in a workbook though all coresponding sheets =?Utf-8?B?RGF2ZSBCYXRlcw==?= Microsoft Excel Misc 2 8th Feb 2004 10:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:27 PM.