+ Reply to Thread
Results 1 to 4 of 4

VBA Macro to unhide all sheets, freezes.

  1. #1
    Registered User
    Join Date
    02-03-2013
    Location
    Canada
    MS-Off Ver
    Office 365 MSO (16.0.13127.21734) 64-bit
    Posts
    23

    VBA Macro to unhide all sheets, freezes.

    I have a workbook that I have been using for several months now without issue until today. I have a workbook that many users use to view some charts. My data and several (30+)worksheets are very hidden and certain sheets are unhid by password protected macro enabled buttons. I have a button for me that runs a simple for each ws in workbook..... ws.visible = true macro. Today when using this button excel will hang after un-hiding 5 or 6 sheets. The same will happen when I step through the code manually. I have narrowed down where it is happening, but can't locate the problem. Each time the line is processed to set the visible to true, in the locals window, I can see what sheet is being unhid. The "type" column shows the sheet#. When the line that freezes is processed it says worksheet/worksheet but no sheet #, and if I click the + symbol on the ws of the expression column it shows <no variables>. Also in the properties window it shows nothing. I can manually skip that step and it will finish the rest of the sheets without issue. Its like it is trying to unhide a sheet that is not there. Any thoughts or ideas of what to do next.

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

    Re: VBA Macro to unhide all sheets, freezes.

    Let's see the code

  3. #3
    Registered User
    Join Date
    02-03-2013
    Location
    Canada
    MS-Off Ver
    Office 365 MSO (16.0.13127.21734) 64-bit
    Posts
    23

    Re: VBA Macro to unhide all sheets, freezes.

    Sorry for the late response, as I was out of the office for a few days. Here is my code.

    Please Login or Register  to view this content.

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

    Re: VBA Macro to unhide all sheets, freezes.

    Attaching a sample workbook enables others to work on your problem:

    To attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and click "manage attachments" to open the upload window.


    To add a file to a post

+ 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. VBA unhide sheets macro problem
    By craig159753 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2015, 06:30 AM
  2. problems with macro to automatically fill the username and macro to unhide sheets
    By djtosh1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2015, 07:14 AM
  3. [SOLVED] How to unhide/hide sheets with Macro?
    By jgomez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2013, 11:22 AM
  4. [SOLVED] Unhide Sheets Macro
    By Kazstankgardner in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-13-2012, 12:31 AM
  5. Macro to unhide sheets IF macro is enabled and hard drive serial # match list of HD#
    By nikolaikolev in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-24-2011, 01:50 PM
  6. Hide/ Unhide Sheets with macro
    By cispus78 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-10-2008, 04:47 PM
  7. macro to hide and unhide sheets
    By EdMac in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-07-2007, 07:03 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