exclusion list in code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to all delete sheets from my workbook except for ones that i specify.
This is what I had in mind. If I wanted to exclude say Sheet1, Sheet4, and
Sheet7, how can I incorporate this into the following code?
Can I call a function?

Bruce

Dim wkSht as WorkSheet
For each wkSht in WorkSheets

if wkSht <> 'something' then

wkSht.Delete

next wkSht
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top