shadow12345
Well-known Member
- Joined
- May 10, 2004
- Messages
- 1,238
I try this time, but I still can't grasp this. I am trying to say if the worksheet name doesn't equal one of the names in the array then delete it.
This is what I tried but it doesn't work.
Can anyone help? I would prefer to know how to fix mine if possible so I can at least undestand a bit more.
This is what I tried but it doesn't work.
Code:
Sub delete_sheets()
ws = Worksheet
wb = Workbook
For Each ws In wb
If ws.Name <> Array("Control Sheet", "Source Data", "Apim") Then Delete.ws
Next ws
End Sub
Can anyone help? I would prefer to know how to fix mine if possible so I can at least undestand a bit more.