What is the Excel VBScript Constant XlFirst

Posted on 2009-02-12
Last Modified: 2012-05-06
I am trying to get the following code to run, what it does is selects the first worksheet tab to the left in a workbook.  THe code was taken from the macro recorder.  I think what I need to do is declare the xlFirst constant but I have no idea what it should be.  Thanks.
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst

Open in new window

Question by:Droo1977
    LVL 92

    Accepted Solution

    xlFirst is 0

    In the future, you can find these things by using the Object Explorer in the VBA Editor, or by running an
    expression like this in the Immediate window:


    Author Closing Comment

    Ok great thanks for the info!

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    734 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

    23 Experts available now in Live!

    Get 1:1 Help Now