+ Reply to Thread
Results 1 to 3 of 3

Strange compatibility problem between ver 2003 and ver 2007

  1. #1
    Forum Contributor
    Join Date
    11-14-2007
    Posts
    142

    Strange compatibility problem between ver 2003 and ver 2007

    I don't know if this is a one-off through some corruption in the workbook, but anyway here goes:

    I have a workbook created in Excel 2003.

    The code in one macro duplicates a hidden worksheet, then makes the new (active) worksheet visible, and initialises the values in some of the cells. It works fine when running under Excel 2003.

    Then I tried to use the same workbook in Excel 2007 (in compatibility mode) and it would not make the new worksheet visible, nor would it initialise the values in the new (hidden) worksheet.

    I got around it by changing the code so that it made the hidden source worksheet visible prior to duplicating it, then re-hiding the source worksheet. Well, I haven't had a chance to test that this works in the 2003 machine at work, but it now runs OK under 2007.

    So I am not looking for an "answer", as I seem to have one. But it would be nice to know that I am not alone.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Strange compatibility problem between ver 2003 and ver 2007

    Hi 1eye, could you post the (original) macro you're using so that we can review it to see why it might be acting differently between versions?

  3. #3
    Forum Contributor
    Join Date
    11-14-2007
    Posts
    142

    Re: Strange compatibility problem between ver 2003 and ver 2007

    OK, sure. There is a fair bit of surplus crap in here. I intend to tidy it up when I have got the basics working. And sorry there is no indentation. It is the sub NewYear() run from the main module that causes the offense. It is the bits in red that are not getting executed.

    In main module, therefore:

    Please Login or Register  to view this content.
    In the ThisOption Explicit

    Please Login or Register  to view this content.
    The userform code is
    Please Login or Register  to view this content.
    As I say, the whole thing works if instead of the red section above I insert:
    Please Login or Register  to view this content.
    EDIT: Forgot the following scrap of code in the main module. Possibly not important:
    Please Login or Register  to view this content.
    Last edited by 1eyedjack; 03-23-2010 at 04:06 AM. Reason: The [Color="Red"] ...[Color] formatting commands do not appear to work within code

+ 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