+ Reply to Thread
Results 1 to 4 of 4

Corrupted Sheet

  1. #1
    Registered User
    Join Date
    04-08-2011
    Location
    Carrollton, Tx
    MS-Off Ver
    Excel 2007
    Posts
    2

    Corrupted Sheet

    When I try to run code behind a worksheet or reference anything on the sheet I get error 32809. Embedded buttons on sheet exist but do not show any properties. When I move worksheet to a new book then move back code behind sheet works fine and sheet is usable again. I presume file lost something with namespace but wondering if there is any easy way to fix versus the moving?

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Corrupted Sheet

    Hi,

    Have you tried cleaning the code?

    Code Cleaner

    abousetta

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Corrupted Sheet

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    04-08-2011
    Location
    Carrollton, Tx
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Corrupted Sheet

    Attached is the workbook with the problem sheet called Setup. Ctrl+m shows the form Menu_Main, which errors out during initiation because it tries to reference a cell on Setup.

    In Module 1 is the routine Protect_worksheets, which calls Lock_worksheets, which walks through each sheet and protects it. What is interesting is that in the locals window Setup is listed as type worksheet/worksheet instead of worksheet/Sheet1.

    If I delete enough code in other places all of the routines suddenly start working properly. Moving the sheet to another file and back works as well. Now I am wondering if there is a way to Excel clean itself up versus doing someting like the code cleaner mentioned?

    Thanks

    Jay
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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