+ Reply to Thread
Results 1 to 3 of 3

Define Named Range scope as "Workbook" instead of "Worksheet"

  1. #1
    Registered User
    Join Date
    11-27-2018
    Location
    Budapest
    MS-Off Ver
    2016
    Posts
    9

    Define Named Range scope as "Workbook" instead of "Worksheet"

    Hi!

    I'm trying to create named ranges dynamically, and I found a way to make it work, but my problem is that it would create the named ranges with worksheet scope instead of global (workbook) scope. I need to refer to these ranges from other tabs, so it would be essential for me to solve this.

    Here is my code:

    Please Login or Register  to view this content.
    How could I modify this to have the above ranges defined with global scope?
    Thanks!
    Last edited by Helghan; 03-06-2020 at 11:58 AM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Define Named Range scope as "Workbook" instead of "Worksheet"

    ActiveWorkbook.Names.Add ...
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    11-27-2018
    Location
    Budapest
    MS-Off Ver
    2016
    Posts
    9

    Re: Define Named Range scope as "Workbook" instead of "Worksheet"

    Wow, that was surprisingly easy fix... many thanks for the answer!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Copy named range "headerrows" to each worksheet as created by named range "classes"
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-25-2017, 05:23 AM
  3. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  4. How to use named ranges in VBA code using "Columns" and a variation on "Range"
    By haljam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-17-2014, 02:48 PM
  5. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  6. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  7. Replies: 3
    Last Post: 06-04-2011, 10:56 AM

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