VBA to Select sheet if you only know part of the sheet name

Posted on 2014-09-01
Last Modified: 2014-09-01
is it possible to select a sheet in excel using VBA code if you only know part of the name

i.e. The sheet name is KIDQ - 85 accounts, tomorrow it could be KIDQ - 125 accounts etc

Question by:Jagwarman
    LVL 47

    Accepted Solution


    pls try

    For Each sh In ActiveWorkbook.Sheets
        If sh.Name Like "KIDQ - * accounts" Then sh.Select


    Author Closing Comment

    brilliant thanks Rgonzo

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
    This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
    The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
    This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now