+ Reply to Thread
Results 1 to 4 of 4

Loop through vba array until empty value

  1. #1
    Registered User
    Join Date
    11-20-2016
    Location
    London
    MS-Off Ver
    2007
    Posts
    5

    Question Loop through vba array until empty value

    Hello Everyone!

    I am having a problem with my VBA code. I have an array in which I put some values and would like to loop through it until the empty value and then displays it in a message box however my code does not seem to work as it displays all values even the empty ones. So I get something like "my message -->apple--> orange--> --> --> -->..."
    The function IsEmpty does not seem to work here.

    Here is my code:

    Please Login or Register  to view this content.
    How can I solve this problem ?
    Thank you in advance for your help.
    Last edited by JBeaucaire; 11-20-2016 at 02:19 PM. Reason: Added missing CODE tags.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Loop through vba array until empty value

    Maybe:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    11-20-2016
    Location
    London
    MS-Off Ver
    2007
    Posts
    5

    Re: Loop through vba array until empty value

    Great! It is working very well!

    Thank you very much for your quick reply!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Loop through vba array until empty value

    As it appears you've reached a conclusion, I've marked this thread SOLVED for you.
    FYI, this is done through the Thread Tools located above the first post in this thread. 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. Loop through list, add to Array, count number of occurrences, clear array
    By HalPlz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-11-2016, 09:42 PM
  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. Loop new messages containing a table, populate a dynamic array, paste array to Excel
    By laripa in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2013, 07:20 AM
  4. [SOLVED] Loop Until Empty Cell
    By gtiguy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-19-2012, 09:20 PM
  5. [SOLVED] Loop macro until empty row
    By philprya in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2012, 11:57 PM
  6. [SOLVED] Help! Loop to next empty row
    By jmetz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-05-2012, 03:27 PM
  7. Replies: 5
    Last Post: 11-29-2005, 10:55 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