+ Reply to Thread
Results 1 to 3 of 3

Find a worksheet by its name

  1. #1
    Forum Contributor
    Join Date
    10-07-2015
    Location
    cyprus
    MS-Off Ver
    Microsoft 365
    Posts
    183

    Find a worksheet by its name

    Good day,

    From a workbook "A" I want to open another workbook "B". In the workbook "B", each worksheet have specific name ("x","Y", "Z", ....).

    I want to activate/select a specific worksheet by its name.

    Here is the code in workbook "A", but on the worksheet line I got a "subscript out of range".....Any tips will be welcome

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Find a worksheet by its name

    "subscript out of range" in this context means the worksheet does not exist.

    Other than the sheet not actually existing, the next most common reason is embedded spaces at the start or end, either in the name on the worksheet tab or the variable

  3. #3
    Forum Contributor
    Join Date
    10-07-2015
    Location
    cyprus
    MS-Off Ver
    Microsoft 365
    Posts
    183

    Re: Find a worksheet by its name

    SOLUTION FOUND

    Please Login or Register  to view this content.
    It was simply the "" in the worksheets name.......I learn everyday in VBA

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to Find/Replace from one worksheet to another worksheet
    By kingsdime29x in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2015, 12:38 PM
  2. Import worksheet and remove old worksheet references with find and replace
    By shawnvon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-11-2015, 12:25 PM
  3. [SOLVED] Loop to find data in a worksheet and copy into a different worksheet.
    By emily_k8_lewis in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-29-2013, 06:44 AM
  4. how to find data from other worksheet and display on other worksheet.....
    By krunal.pa in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 10-13-2013, 02:49 PM
  5. [SOLVED] Find and copy to other worksheet if not find something else.
    By jnh0 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-13-2013, 12:25 AM
  6. Replies: 6
    Last Post: 02-23-2013, 10:37 PM
  7. Excel VBA find newest worksheet based on date/time stamp in worksheet name?
    By takchin.tc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-27-2012, 03:56 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1