+ Reply to Thread
Results 1 to 3 of 3

Name definition error when copying sheet

  1. #1
    Registered User
    Join Date
    10-12-2011
    Location
    London
    MS-Off Ver
    Office Mac 2011
    Posts
    7

    Name definition error when copying sheet

    Hi,
    I have a number of issues with my little project. I have some VB functions (from forums) and the main issue is when I copy the sheet, It keeps asking for me to rename them as they already exist. In addition, they then seem to be working sporadically.

    I did reference some names within names and thought that may be part of the problem but I removed all those and it didn't fix it.

    I've included my project and any help will stop me from tearing my hair out.
    (I'm on a mac with office 2011)

    Many thanks
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-12-2011
    Location
    London
    MS-Off Ver
    Office Mac 2011
    Posts
    7

    Re: Name definition error when copying sheet

    So, I have done some digging and it seems that the =RefOnPrevSheet("xxx") function doesn't seem to like xxx to = a name that is defined where that name is derived from a calculation of other names. I have done a test worksheet and can repeat the error. I still can't get the error message "A Formula or sheet you are trying to copy contains the name 'xxx', which already exists on the destination worksheet."

  3. #3
    Registered User
    Join Date
    10-12-2011
    Location
    London
    MS-Off Ver
    Office Mac 2011
    Posts
    7

    Re: Name definition error when copying sheet

    And more digging...so It would appear that if you have an error with =RefOnPrevSheet("xxx") as described above, it seems to throw the other Subs off and errors show up all over...I deleted the sheet, went back fixed the error and ran the new sheet macro and all was well. It seems my errors stem from 'nesting names' in the custom functions and then copying the sheet....as the errors cascade...much harder to return to a working version.

    In short, the custom functions do not appear robust with this use case....anyone provide advice on how to fix these issues would be a star!!

+ 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