+ Reply to Thread
Results 1 to 3 of 3

Return a single message box within a loop.

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    USA
    MS-Off Ver
    Excel 2011
    Posts
    1

    Return a single message box within a loop.

    Hi! I need to be make a multiplication table from a user input variable. I am using a for loop and have that part down; however, I need the multiplication table to be output in only one message box. This is the code I have so far....

    Please Login or Register  to view this content.
    Could someone please shed some light on how to stop from looping a new message box each time and only return one involving the entire table?
    For example I need to return
    1*2=2
    2*2=4
    3*2=6
    4*2=8
    5*2=10
    6*2=12
    ...and so on for x=2 THANKS
    Last edited by jeffreybrown; 10-19-2012 at 08:39 PM. Reason: Added code tags for new user...Please do so next time...Thanks.

  2. #2
    Registered User
    Join Date
    08-15-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Return a single message box within a loop.

    Try this code:

    Please Login or Register  to view this content.
    I added each of your looping answers to an array and then displayed that array in the message box. See if that works.

  3. #3
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Return a single message box within a loop.

    You can also accomplish it with just text manipulation without the use of arrays:

    Please Login or Register  to view this content.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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