Consulting

Results 1 to 3 of 3

Thread: Sleeper: A simple question

  1. #1

    Question Sleeper: A simple question

    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!

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    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.

  3. #3
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Happy New Year pinliang!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •