Question

I have the next VBA code:

Public Sub SaveAsA1()
    ThisFile = Range("B1:B31").Value
    ActiveWorkbook.SaveAs Filename:=ThisFile
End Sub

I want to know how can i delete the sheet from where i take my names before saving. My file have 3 sheets, 2 that i need to remain in there and one that i have to delete. The last one is in there only for that range, for my VBA scrip. Please let me know if you can help me. Thanks a lot!

Was it helpful?

Solution

VBA offers the .Delete method which, when called on your Worksheet, will delete it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top