+ Reply to Thread
Results 1 to 5 of 5

move sheet without names ranges

  1. #1
    Forum Contributor
    Join Date
    03-21-2004
    Location
    Norwich, CT USA
    MS-Off Ver
    Excel 2010
    Posts
    163

    move sheet without names ranges

    I create weekly reports using Data validation drop down menus in several columns. The data is located via named ranges.
    Once complete I run a macro that makes a new "clean" sheet with just the values and any local named ranges removed.
    Please Login or Register  to view this content.
    After that I right click on the sheet tab and move the "clean sheet" to a separate summary workbook that I email to the recipients.

    The problem is that the global named ranges from the source workbook move with the clean sheet.

    to remove the names i can run this code in the destination workbook:
    Please Login or Register  to view this content.
    In order to avoid security issues I then have to copy the "clean" and "name free" sheet to a third workbook that is "macro free"
    That works but I would like to get rid of the extra step.

    What I am thinking is to run "moving the worksheet" via a macro and either clean the global names after the move as part of the macro or if possible instruct excel to move the sheet without the named ranges.
    Any advice on which path to take or another option?

    thanks
    Robert

  2. #2
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: move sheet without names ranges

    You should be able to move the sheet to the new workbook via VBA, then clean out the names.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-21-2004
    Location
    Norwich, CT USA
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: move sheet without names ranges

    Wallyeye, thanks your reply and code suggestion.
    I'm receiving a "Subscript out of range (Error 9)" at the line:
    Please Login or Register  to view this content.
    So far I am unable to resolve it.
    any suggestions?

  4. #4
    Forum Contributor
    Join Date
    03-21-2004
    Location
    Norwich, CT USA
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: move sheet without names ranges

    Figured it out. I just needed to get the focus back on the source workbook. I added the line:
    Please Login or Register  to view this content.
    ahead of the copy line.
    Thanks again for the help Wallyeye

  5. #5
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: move sheet without names ranges

    You could preface the copy:

    Please Login or Register  to view this content.
    rather than activating the sheet. It will give you a very slight performance increase.

+ 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