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

  • Home
  • SEARCH
  • 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 208695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:50:56+00:00 2026-05-11T17:50:56+00:00

Hidden worksheets/workbooks have some limitations to what can be done in VBA code, like

  • 0

Hidden worksheets/workbooks have some limitations to what can be done in VBA code, like most Select and Selection statements, and anything coming from ActiveSheet, but I can’t seem to find any list of what the limitations are.

Google, the built-in documentation in the help system, and MSDN’s website have all failed me. Can anyone point me in the right direction?

Edit:
The workbook is opened with

Set WB_Master = Workbooks.Open(Filename:=PATH_Master, ReadOnly:=False)

and then hidden with

WB_Master.Windows(1).Visible = False
  • 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-11T17:50:56+00:00Added an answer on May 11, 2026 at 5:50 pm

    From the Visual Basic for Applications help:

    When an object is hidden, it’s removed from the screen and its Visible property is set to False. A hidden object’s controls aren’t accessible to the user, but they are available programmatically to the running application, to other processes that may be communicating with the application through Automation, and in Windows, to Timer control events.

    Not much help there I’m afraid, and I couldn’t find much else through Google.

    As you said yourself, the Select method and Selection Property don’t work on a hidden Worksheet, they should work on a hidden Workbook though. (Please correct me if I’m wrong.) In general however, it’s not always all that efficient to select ranges in worksheets anyway, you are better off working with the Range property (which does work on a hidden worksheet).

    EDIT:

    The following code will change the color of A1:A8 to Cyan even when the Worksheet is not visible:

    Dim book2 As Workbook
    Set book2 = Workbooks.Open("C:\Book2.xls")
    
    book2.Worksheets("Sheet1").Visible = False
    book2.Windows(1).Visible = False
    
    With book2.Worksheets("Sheet1").Range("A1:E8").Interior
        .ColorIndex = 8
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
    End With
    
    book2.Windows(1).Visible = True
    book2.Worksheets("Sheet1").Visible = True
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 248k
  • Answers 248k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Opencv (image processing and computer vision library written in c)… May 13, 2026 at 8:50 am
  • Editorial Team
    Editorial Team added an answer You could try something on these lines: ''Some notes on… May 13, 2026 at 8:50 am
  • Editorial Team
    Editorial Team added an answer First of all, there's no such thing as $.document. I… May 13, 2026 at 8:50 am

Related Questions

I want to do the moral equivalent of the following VBA code: For Each
Alright I know this isn't 100% related to programming (the Excel book in question
I'd like to have the value of a cell change if a specific set
Here is the code that applies an advanced filter to the column A on

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.