R
rweide
I am trying to initialize (or clean up/empty) all the worksheets in a
workbook. What is the right way to this?
workbook. What is the right way to this?
Alvin Bruney said:You should iterate the contents of the active workbook and call the delete
method of each worksheet. another approach is to iterate the worksheets
collection calling delete
--
Regards,
Alvin Bruney [Microsoft MVP ASP.NET]
[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
----------------------------------------------------------
rweide said:I am trying to initialize (or clean up/empty) all the worksheets in a
workbook. What is the right way to this?
rweide said:Thank you.
This is what I do --
For i = 1 to SS1.Worksheets.Count
SS1.Worksheets(i).Select
SS1.ActiveSheet.Delete
Next
I am still testing to see if this works perfectly.
Alvin Bruney said:You should iterate the contents of the active workbook and call the
delete
method of each worksheet. another approach is to iterate the worksheets
collection calling delete
--
Regards,
Alvin Bruney [Microsoft MVP ASP.NET]
[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
----------------------------------------------------------
rweide said:I am trying to initialize (or clean up/empty) all the worksheets in a
workbook. What is the right way to this?