Results 1 to 7 of 7

Thread: [RESOLVED] using input box with multiple option

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    18

    Resolved [RESOLVED] using input box with multiple option

    I was using different input box's to gather information from users.

    Now my users wants all the information to be gathered using a single menu.

    One option is that i create a form using multiple combo boxes and then load that form to gather the information but that is going to change my code which i don't want.

    Can any one suggest me as to how to use a single input box with multiple option to gather info from the users.

    A quick help will be appreciated.

    Thanks,
    Amit

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: using input box with multiple option

    You could possibly present the inoutbox multiple times but it will be best if you just redesign the form.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: using input box with multiple option

    You can't with an Input box but if you create your own form and "pop it up" like an Input box then you can get all your information at once.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    18

    Re: using input box with multiple option

    Thanks guys for this superfast help.

    Just wanted to have some expert opinion before i proceeded with my idea of creating a form.

    Amit

  5. #5
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: using input box with multiple option

    Which aspect of your original code did you want to retain? Storing into individual variables the result obtained from the input box?

    You could place create properties in your form with the Public Property Get statement... that way you can access the properties individually and would be a good place to start learning about creating interfaces.

    So if your original code was

    sRetValue1 = InputBox(...)
    sRetValue2 = InputBox(...)

    you can upgrade it to

    frmInputMenu.Show vbModal 'hide form after use to retain values
    sRetValue1 = frmInputMenu.Value1 'property named value1
    sRetValue2 = frmInputMenu.Value2 'property named value2
    Unload frmInputMenu 'unload hidden form if no longer needed

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    18

    Re: using input box with multiple option

    You got it. I think this is not going to change my code much.

    Thanks for your help

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    18

    Re: using input box with multiple option

    Thanks all,

    I have been able to redesign my application without doing much changes in the code

    Amit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width