Does anyone know how to check whether certain sheets exist or not in an Excel document using Excel VBA?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Although (unfortunately) such method is not available, we can create our own function to check this..
Hope the code below fits your needs.
Edit1: Added also delete statement…
The solution I’d go for…
Alternatively, if you don’t mind to use code that actively raise errors (which is not recommended by common coding best practices) you could use this ‘Spartan Programming wannabe’ code below…