+ Reply to Thread
Results 1 to 9 of 9

VBA reference a range of cells in WB array instead of manually typing names out

  1. #1
    Registered User
    Join Date
    07-08-2017
    Location
    Minnesota
    MS-Off Ver
    Microsoft Office 2016
    Posts
    74

    VBA reference a range of cells in WB array instead of manually typing names out

    Hello,

    I am wondering how to reference a range of cells for the WbNames Array variable or if there is another way I have to do that? I have the work book names from below typed out in cells F2, F3, F4, etc, and rather have it reference that range instead of having to type the workbook names in VBA. That way I can change the WbNames in Excel.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA reference a range of cells in WB array instead of manually typing names out

    Maybe:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    07-08-2017
    Location
    Minnesota
    MS-Off Ver
    Microsoft Office 2016
    Posts
    74

    Re: VBA reference a range of cells in WB array instead of manually typing names out

    I am getting a subscript out of range for this part:
    Please Login or Register  to view this content.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA reference a range of cells in WB array instead of manually typing names out

    How many names do you have in column F?

  5. #5
    Registered User
    Join Date
    07-08-2017
    Location
    Minnesota
    MS-Off Ver
    Microsoft Office 2016
    Posts
    74

    Re: VBA reference a range of cells in WB array instead of manually typing names out

    There are 8 workbook names

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA reference a range of cells in WB array instead of manually typing names out

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA reference a range of cells in WB array instead of manually typing names out

    Hi Hoover,

    Thanks for the rep! Will you be uploading?

  8. #8
    Registered User
    Join Date
    07-08-2017
    Location
    Minnesota
    MS-Off Ver
    Microsoft Office 2016
    Posts
    74

    Re: VBA reference a range of cells in WB array instead of manually typing names out

    Hi xladept,

    Sorry I have been super busy. I actually figured it out. Thank you

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA reference a range of cells in WB array instead of manually typing names out

    Glad you got it!

+ 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. Vba to allow typing on on screen keyboard to populate range of cells
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-04-2016, 04:28 AM
  2. [SOLVED] Help with: Range Array SelectCase Loop delete: Array All Sheet.Names
    By dlow in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-08-2015, 07:11 PM
  3. [SOLVED] How to add a reference to an array or range of cells in an SQL query
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-16-2014, 05:51 AM
  4. Typing an array into a formula rather than referring to an array of cells
    By Cookstein2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-03-2013, 12:59 PM
  5. Replies: 7
    Last Post: 09-20-2011, 01:50 PM
  6. Replies: 1
    Last Post: 12-14-2005, 05:00 PM
  7. [SOLVED] Are there any shortcuts to typing range names?
    By KG in forum Excel General
    Replies: 8
    Last Post: 06-20-2005, 10:33 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