+ Reply to Thread
Results 1 to 13 of 13

Capture array into message box

  1. #1
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Unhappy Capture array into message box

    First, I want to put the following array into a message box.
    Please Login or Register  to view this content.
    Second, after the user has completed the revisions/edits to the user form inputs, i want to capture all the users selections from the combo boxes, text boxes and option buttons, is their a simple way to put this into an array so that the beginning array can be compared to the ending array?

    Thanks
    Last edited by jprlimey; 07-22-2014 at 07:55 AM. Reason: Solved

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Capture array into message box

    Hi
    for capturing array to a msgbox..

    try following code.... after end with

    Please Login or Register  to view this content.

    Don't forget to click *

  3. #3
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Capture array into message box

    Vikas,

    Thank you for the suggestion.

    I tried your slution the message box does show but is completely blank, any thoughts?

    Thanks

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Capture array into message box

    You need to modify your other code as you are not storing any information in the array.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Capture array into message box

    Hi jprlimey,

    change your code.. as per Andy's Suggestion..

    and then try running my code..

    hopefully you will get the results...



    Don't forget to click *

  6. #6
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Capture array into message box

    Andy,

    Thank you for the reply.

    When i step thru the macro using the debug mode "step into", i can clearly see that the myVar(s) are loading with the correct information, so i'm not sure how it is not storing the infromation. So how do you suggest that i change the macro, any help would be appreciated.

    Thanks

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

    Re: Capture array into message box

    Please Login or Register  to view this content.

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Capture array into message box

    Hello jprlimey,

    A message box can display only about 1024 characters in total. Your array may not display all it's the information.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  9. #9
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Capture array into message box

    Leith,

    That is a good point about the message box maximum size of 1024 characters. In this case if some of the variables are empty and nothing shows does that count towards the 1024 characters?

    Thanks

  10. #10
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Capture array into message box

    Jindon,

    The suggestions worked great, the message box displays everything.

    Now i tried to capture what the user may have changed, for this i created another sub routine that is called just before the user form selections are placed onto the worksheet. See below, this is not the entire variables i truncated them for ease of discussion and only show 1 thru 6.

    I tried to declare the myVerify as both String and Variant but neither worked. I though that the values that the user slected through the combo and text boxes would be still available to place into an array being that i called this sub routine within the initial sub routine, any thoughts?


    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Capture array into message box

    Jindon,

    The suggestions worked great, the message box displays everything.

    Now i tried to capture what the user may have changed, for this i created another sub routine that is called just before the user form selections are placed onto the worksheet. See below, this is not the entire variables i truncated them for ease of discussion and only show 1 thru 6.

    I tried to declare the myVerify as both String and Variant but neither worked. I though that the values that the user slected through the combo and text boxes would be still available to place into an array being that i called this sub routine within the initial sub routine, any thoughts?


    Please Login or Register  to view this content.

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

    Re: Capture array into message box

    You are not assigning values to the array.
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Capture array into message box

    Jindon,

    I see my mistake, thanks for helping me along. I going to close this post as Solved.

    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. Capture data from access form into outlook body message?
    By ciapul12 in forum Access Tables & Databases
    Replies: 2
    Last Post: 05-18-2014, 07:48 AM
  2. Assistance redimemsioning array to capture additional data
    By AlvaroSiza in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2012, 04:00 PM
  3. [SOLVED] Message box that pops up if values in array are <=0
    By emoandy05 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-24-2012, 12:33 PM
  4. How to capture return value from data validation error message box
    By franklyn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-13-2012, 01:57 PM
  5. Array Formula Error Message
    By elew69811 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-08-2008, 01:21 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