PDA

View Full Version : Sleeper: A simple question



pinliang2004
02-08-2005, 01:15 AM
Hello! I'm a beginner of EXCEL VBA. I'm from China. It will be the Chinese Lunar New Year tommorrow. So happy new year to all.
I learned VBA from some examples writen by others. I got to know some methods of judging existence of Excel Object. But there's still something I'm not very clear.
My question is how to know whether a name of a sheet has already existed or not.
This is my first post in this Forum. Glad to find this place where I can communicate with so many experts on VBA.
I'll continue my study of VBA and hope that I can get help from you. Thanks! Happy Chinese New Year!

Jacob Hilderbrand
02-08-2005, 01:30 AM
Hi, welcome to the board and happy New Year.

Basically what you want to do is use an On Error Resume Next statement and then try to do something with the worksheet (i.e. activate it, or set a variable to it etc.). Then see what happens.

We have an example of this in the Knowledge Base (http://www.vbaexpress.com/kb/getarticle.php?kb_id=187).

Zack Barresse
02-08-2005, 12:58 PM
Happy New Year pinliang!!!