+ Reply to Thread
Results 1 to 4 of 4

Excel crashes when unhiding or hiding sheet

  1. #1
    Forum Contributor
    Join Date
    11-25-2010
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    120

    Excel crashes when unhiding or hiding sheet

    Hi All,

    Been using Excel for a few years now but VBA for a short while so I'm not sure how everything fits together. I've noticed something with two Workbooks I've created which is rather annoying.

    They both have Pivottables that have their Datasources on seperate sheets that are usually hidden. As 2007 doesn't have the slicers 2010 has I use a dropdown so the user can select the required date and then this is applied to the Pivot as a filter. The problem I have is when hiding/unhiding the data sheets Excel freezes up. I can still get in to the VB editor with Alt+F11 and save or check the code but Excel is frozen. If I kill it with Task Manager and re-open the file then it is saved with the sheet now visible but when I hide it I have the same issue again.

    I would appreciate any views on why this could be happening.
    Last edited by Lifesigns; 11-27-2010 at 07:26 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel crashes when unhiding or hiding sheet

    Hi,

    Not sure why it's happening but I've noticed similar behaviour with stuff not necessarily related to pivot tables.

    My quick and dirty solution is to use the Immediate window in the VBE and type Range("A1").Select. This clears the frozen window. You could allocate this to a small one line macro in your Personal workbook if you prefer.

    I know it's not a solution but it would avoid using Task Manager and perhaps losing data.

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,359

    Re: Excel crashes when unhiding or hiding sheet

    Hi Lifesigns,

    I've had a problem with pivot filters using VBA. You can not remove all the filters with vba or you get an error. I've had to shift what is checked in the pivot filter to insure at least one is checked before it will work correctly.

    Is it possible that is your problem?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Contributor
    Join Date
    11-25-2010
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    120

    Re: Excel crashes when unhiding or hiding sheet

    Hi there,

    Thanks for the help the Immediate Window did the trick.

    I've noticed the issue with the filters before, was wondering if there is way to rebuild the pivotcache to remove invalid entries. Anyway I'll leave that for another day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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