Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Excel activesheet(variable) manipulation

delljohnbdelljohnb Posts: 81Member
This might be a fairly simple set of questions...

how do I :

1) get the NUMBER of sheets that a workbook has
2) get the name of a specific numbered sheet
3) would "activesheet(NUMBER)" let me assign the sheet that I want to manipulate?

You assistance is appreciated.

Respectfully,
Delljohnb

ps. pardon my NOOB questions. I'm new to VB. I'm a Pascal programmer by trade.

Comments

  • delljohnbdelljohnb Posts: 81Member
    : This might be a fairly simple set of questions...
    :
    : how do I :
    :
    : 1) get the NUMBER of sheets that a workbook has
    : 2) get the name of a specific numbered sheet
    : 3) would "activesheet(NUMBER)" let me assign the sheet that I want to manipulate?
    :
    : You assistance is appreciated.
    :
    : Respectfully,
    : Delljohnb
    :
    : ps. pardon my NOOB questions. I'm new to VB. I'm a Pascal programmer by trade.
    :


    I should have added that I'm wanting to run a for loop with the number of cycles equal to the number of sheets. I'm also needing the name of the sheet, not just the sequential number...

    like sheet 1 is named "First Page"
    sheet 2 is named "Another Sheet"

    I need the number of sheets and the name of each sheet.

    is the something like

    "For Counter = 1 to NumberOfSheets" where I can grab the name of the sheet and put it into an array like NameOfSheet(Counter) and NumberOfSheets would be an integer that equals the total number of sheets in the workbook.

    In the above example NameOfSheet(1) would return the text string "First Page".


    Thanks again.
    Delljohnb

Sign In or Register to comment.