Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Tabname Check

  1. #1
    New Member
    Join Date
    Feb 2002
    Location
    sandy
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    i am looking for a macro that will check the tab name's against a cell in a sheet i.e

    if (tabname)=Range("A1") Then
    Do this
    Else
    Do this

    thank you for your time

  2. #2
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    813
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    In related sheet's module:

    if (me.name)=Range("A1") Then
    'Do this
    Else
    'Do this
    End if

    Me.Name points to owner sheet, or you can use
    Sheet1.Name instead but Sheet1 is the object name in VBA which you can see in theproject explorer.

    regards
    Suat

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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