+ Reply to Thread
Results 1 to 4 of 4

Are named ranges not automatically visible to VBA?

  1. #1
    Registered User
    Join Date
    01-25-2014
    Location
    Minneapolis
    MS-Off Ver
    Professional Plus 2010
    Posts
    19

    Are named ranges not automatically visible to VBA?

    My sheet has a range named "Morris" (B10 through C14) which I want to become a rowsource at some point for ListBox1. (I defined this range outside of VBA, just by selecting the range and right clicking on Define Name.)

    Please Login or Register  to view this content.
    gives a runtime error 13; type mismatch.

    Do I need to write a line of code that defines the range "Morris"? I was sort of counting on VBA being able to find it, the same way it knows how to find Range"A1" etc.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Are named ranges not automatically visible to VBA?

    If you want to use the named range for the RowSource all you need is the name.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    01-25-2014
    Location
    Minneapolis
    MS-Off Ver
    Professional Plus 2010
    Posts
    19

    Re: Are named ranges not automatically visible to VBA?

    I'm used to VBA benig far more byzantine than that!!!!!

    Thank you Norie.

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Are named ranges not automatically visible to VBA?

    What about:

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    ?

    WBD
    Office 365 on Windows 11, looking for rep!

+ 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. [SOLVED] Named Ranges, automatically say yes to overwritting them.
    By JimmyWilliams in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2017, 10:40 PM
  2. [SOLVED] Named Ranges in Excel that Automatically Expand
    By bjnockle in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 11-30-2015, 01:34 PM
  3. [SOLVED] VBA creates named ranges, but named ranges disappear
    By BrotherNeptune in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2015, 03:22 PM
  4. [SOLVED] Trying to use multiple named ranges in the body of an automatically sent email from Excel
    By Jo2710 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-18-2014, 12:01 AM
  5. Replies: 4
    Last Post: 06-11-2012, 06:17 PM
  6. Automatically combine data in two named ranges
    By steric in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-15-2009, 12:30 PM
  7. [SOLVED] Automatically increase Named Ranges
    By Gerrym in forum Excel General
    Replies: 4
    Last Post: 01-04-2005, 10:06 AM

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