+ Reply to Thread
Results 1 to 7 of 7

pass array or list to sub routine

  1. #1
    Registered User
    Join Date
    03-16-2020
    Location
    uk
    MS-Off Ver
    2016
    Posts
    33

    pass array or list to sub routine

    Hi all im trying to pass a listof numbers to a subroutine to then loop through them so far ive got the sub but i cant seam to work out how to call it i would like something like

    Please Login or Register  to view this content.
    heres the sub

    Please Login or Register  to view this content.
    Kind regards tim

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: pass array or list to sub routine

    Hi Tim...
    What are you wanting to achieve...
    I suggest uploading a sample file and explain in detail what you are trying to achieve...See top yellow banner
    I am assuming you want to populate ComboBoxes 2,4,7 & 9
    Please Login or Register  to view this content.
    Last edited by sintek; 05-11-2020 at 06:11 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    03-16-2020
    Location
    uk
    MS-Off Ver
    2016
    Posts
    33

    Re: pass array or list to sub routine

    hi yes thats correct i wish to populate the comboboxes there are qute a few so rather than writing

    Please Login or Register  to view this content.
    for every control i would like to loop through them im just not sure on pass an array which would be the combobox id number to my subroutine it doesent need to return a value

    Kind regards tim

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: pass array or list to sub routine

    Do you mean like this?
    Please Login or Register  to view this content.
    heres the sub

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-16-2020
    Location
    uk
    MS-Off Ver
    2016
    Posts
    33

    Re: pass array or list to sub routine

    Hi thanks

    thats what im hoping for but i get a type missmatch

    Thanks tim

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: pass array or list to sub routine

    Try change to
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-16-2020
    Location
    uk
    MS-Off Ver
    2016
    Posts
    33

    Re: pass array or list to sub routine

    fab

    thanks

+ 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. Pass a variable result from on Sub routine to another
    By williamkwells in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-11-2020, 03:43 PM
  2. How to pass cell references to a sub routine?
    By RustyNail in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-17-2018, 05:48 PM
  3. How to pass cell references to a sub routine?
    By RustyNail in forum Excel General
    Replies: 7
    Last Post: 02-17-2018, 10:40 AM
  4. Replies: 7
    Last Post: 03-12-2017, 03:20 PM
  5. Pass a variable from one sub-routine to another sub-routine
    By gowtham_pec in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-01-2013, 07:07 PM
  6. [SOLVED] Pass Variables to Sub Routine in Different Workbook
    By shadyferret in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2013, 09:12 PM
  7. How to pass a worksheet address to a sub routine
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-09-2012, 02:58 PM

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