+ Reply to Thread
Results 1 to 2 of 2

Only allow 8 sheets open on workbook

Hybrid View

Yoepy Only allow 8 sheets open on... 07-30-2018, 05:02 AM
davesexcel Re: Only allow 8 sheets open... 07-30-2018, 08:33 AM
  1. #1
    Forum Contributor
    Join Date
    04-16-2014
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    125

    Only allow 8 sheets open on workbook

    I'm not even sure this question will make sense......but here goes.

    I have a workbook that has many pages, which can make it unmanageable.

    I have 5 sheets that need to remain open. The names on these sheets don't change.

    But the others are based on a variety of variables. I currently close the sheets as follows (sorry for not using the code wrap)

    Private Sub Worksheet_Deactivate()
    Me.Visible = xlHidden 'Hide sheet

    I use this to close the sheet I have been using after I leave it. (I use a VBA code to open it).

    Should I just stop now.....

    I want the five sheets + the last three that have been opened visible. If a forth sheet is opened then the oldest drops off being visible - the 5 remain visible.

    If it helps the code to opens the sheets uses the sheet names, I could store those either dim or in a helper column

    I really hope that makes sense. I'll just give up now.

    Confused and confusing
    Yoepy.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Only allow 8 sheets open on workbook

    I suppose if you were using a code to hide and unhide sheets, you could place a value to that sheet beside a sheet list(helper column). it does sound confusing right now. Somehow, you would have to sort and replace the values on the go, which is no problem, just need to think on the logic some more.

    Maybe supply a sample workbook, so we can work with your codes and worksheets

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Copy Sheets from Closed Workbook into Open Active Workbook without linking
    By CHRISOK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-16-2018, 04:54 PM
  2. Import all sheets from closed workbook to the open workbook
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-10-2013, 04:05 AM
  3. Copy 2 sheets from a open workbook and paste to a closed workbook
    By grimston in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-27-2012, 03:27 PM
  4. [SOLVED] Open New Workbook with 0 Sheets
    By mpeplow in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-25-2007, 12:55 PM
  5. How do I open a empty workbook with no sheets?
    By ChartsToBe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2006, 03:45 PM
  6. Replies: 0
    Last Post: 03-06-2006, 01:07 PM
  7. Check sheets name and open goto workbook
    By Mark in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2005, 09:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1