[Last Call] Learn how to a build a cloud-first strategyRegister Now


What is the Excel VBScript Constant XlFirst

Posted on 2009-02-12
Medium Priority
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 93

Accepted Solution

Patrick Matthews earned 2000 total points
ID: 23623073
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

ID: 31546091
Ok great thanks for the info!

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

831 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