+ Reply to Thread
Results 1 to 7 of 7

VBA Input Box - Multiple Input Values

  1. #1
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    VBA Input Box - Multiple Input Values

    Hi, I wonder whether someone may be able to help me please.

    I know how to create an 'Input Box' via VBA to allow a user to enter a value which, for example, performs a task which opens and extracts multiple files before amalgamting them into a "Summary " sheet.

    But could you tell me please, is it possible to capture multiple values from one 'Input box'?

    I've carried out some research on this, but I've been unable to find a suitable thread/tutorial which I could build upon.

    I just wondered whether somoene may be able to confirm whether this is possible or not, and if so point me in the direction of a tutorial/guidance which I can use.

    Many thanks and kind regards

    Chris

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VBA Input Box - Multiple Input Values

    In the input box fill the file name with a separator like

    File1.xls|File2.xls|File3.xls etc.,

    Then use

    Split(InputboxValue,"Seperator Here")

    arFileList = Split(InputboxValue,"|")

    arFileList is an array which will hold all the inputted file names.

    Now you can loop though the arFileList array and open the files


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Input Box - Multiple Input Values

    Hi @Sixthsense, firstly thank you for taking the time to reply to my post and secondly, my sincere apologies for not providing a poor example because I didn't realise how complex it may be.

    The script I'm trying to adapt is as below:

    Please Login or Register  to view this content.
    I've even been able to get one value to extract the records, but I'm struggling to implement where the user can enter mutliple values.

    I hope this helps and my apologies for the lack of clarity.

    Many thanks and kind regards

    Chris
    Last edited by hobbiton73; 12-03-2014 at 05:58 AM.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VBA Input Box - Multiple Input Values

    Quote Originally Posted by hobbiton73 View Post
    I've even been able to get one value to extract the records, but I'm struggling to implement where the user can enter mutliple values.
    Which line of code refers to that one value?

    The below one?

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Input Box - Multiple Input Values

    Hi @Sixthsense, thank you for coming back to me with this.

    I can confirm that you are correct in your assumption, the line you highlight is the line which captures the value.

    Many thanks and kind regards

    Chris

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VBA Input Box - Multiple Input Values

    I can give you an idea but you have to adjust it for your code

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Input Box - Multiple Input Values

    Hi @Sixthsense, thank you very much for this, it works great!

    All the best and kind regards

    Chris

+ 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. input values to effect total, then rest input to zero
    By dreakshadowalker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2013, 05:11 PM
  2. Returning multiple values in multiple cells based upon one input
    By ccoonsk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2012, 10:01 AM
  3. Input multiple data into one input field (VBA)
    By Gaz_m2k5 in forum Excel General
    Replies: 3
    Last Post: 03-06-2012, 02:42 PM
  4. is it possibel to have multiple input values in one cell?
    By quimrider in forum Excel General
    Replies: 5
    Last Post: 02-11-2009, 06:03 PM
  5. Calculate multiple results from multiple input values?
    By Jetta1515 in forum Excel General
    Replies: 6
    Last Post: 06-01-2006, 10:09 AM

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