in reply to Delete a sheet in excel
In your visual basic program
As marto says, you'll want to translate that to perl if you're programming in perl