Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7060007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:18:03+00:00 2026-05-28T04:18:03+00:00

There is a way to select multiple Excel sheets and then do some action

  • 0

There is a way to select multiple Excel sheets and then do some action on them like Print. However given a workbook, how do i get to know which sheets are selected. There is a vba property Application->ActiveSheet which gives us current active sheet, but i couldn’t find any way to get multiple sheets for this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:18:03+00:00Added an answer on May 28, 2026 at 4:18 am

    Is this what you want?

    Option Explicit
    
    Sub Sample()
        Dim ws As Worksheet
        Dim SelectedSheets() As String
        Dim n As Long, i As Long
    
        n = 0
        For Each ws In ActiveWindow.SelectedSheets
            ReDim Preserve SelectedSheets(n)
            SelectedSheets(n) = ws.Name
            n = n + 1
        Next
    
        For i = LBound(SelectedSheets) To UBound(SelectedSheets)
            '~~> This will give you the list of selected sheets
            Debug.Print SelectedSheets(i)        
        Next i
    
        '~~> The collection can also be used as below
        'Sheets(SelectedSheets).Copy
        'Sheets(SelectedSheets).Select   ' e.g., to re-select them later
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is there a way to select multiple div with css?? like div id=text-box4 div
Is there a way to select data where any one of multiple conditions occur
Is there a way to select multiple values with prepared statements in (My-)SQL? I'm
Is there a way I can make an HTML multiple select box read-only? I
Is there a way in jqgrid to select multiple cells? Ideally I want to
Is there a simple way to select and move (rotate, pan, zoom) multiple shapes
Is there a way to select multiple accounts to share to using http://getsharekit.com ?
Is there any way to select multiple rows in a jqGrid tree structure? On
Is there a way to select a parent element based on the class of
Is there a way to select designtime packages on a project bases? Packages are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.