+ Reply to Thread
Results 1 to 14 of 14

message input box returns lines/rows based on the input

  1. #1
    Registered User
    Join Date
    05-07-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    message input box returns lines/rows based on the input

    Hello,

    I am a newbie here who is kinda helpless. Been working on this table for 10 days now and I couldnt find a work around the data i need to get.
    i have a message input box where users will provide their names, and perhaps addional information, then once information is in, id like the worksheet to return the rows/lines filtered based on the inputs of the users.

    so far, i have only arrived to this first code and i dont know who to get to the next level. your help will be very much appreciated. thanks in advance.

    Sub GetUserName()

    Dim strName As String

    strName = InputBox(Prompt:="You name please.", _
    Title:="ENTER YOUR NAME", Default:="Your Name here")

    If strName = "Your Name here" Or _
    strName = vbNullString Then
    Exit Sub
    Else
    Select Case strName
    Case "Damon"
    'Do Damons stuff
    Case "Vince"
    'Do Vinces stuff
    Case "Singh"
    'Do Singhs stuff
    Case Else
    'Do other stuff
    End Select
    End If

    End Sub

  2. #2
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: message input box returns lines/rows based on the input

    I do not know where/what your data looks like but this might give you a start:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-07-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: message input box returns lines/rows based on the input

    Thank you Coretroy. I should probably attach here the table. This is in fact extracted from a huge database program and have removed the other columns I dont need.

    What I was looking for is when:
    A message Input box such as "Enter Name"
    Followed by Input box " Cat"

    Will return the excel sheet filtered as per the data requested by user.

    Appreciate your help. Ta.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: message input box returns lines/rows based on the input

    See Attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-07-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: message input box returns lines/rows based on the input

    Hi again. Is it possible that these filter buttons come out as a pop up message once you open excel?

  6. #6
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: message input box returns lines/rows based on the input

    The House icon on the ribbon will reset the filter if needed.

    When opening the Wkb the prompt will be displayed.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-07-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: message input box returns lines/rows based on the input

    Hello coreytroy. thank you again. your code works really well until i tried to apply it on mine. i suck in vba programming and im hoping to receive some more help from experts like you.

    I got this table extracted from our database and what i was trying to do is to once i open this file, the message input will come out requiring users to choose their name, the category they want and the status. the code works till searching ones name, but the 2 other list boxes becomes empty and i cant choose the item i want. would really appreciate if you can put some touch to this one please....thanks again in advance.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: message input box returns lines/rows based on the input

    See attached.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-07-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: message input box returns lines/rows based on the input

    Hi coreytroy! I dont know how you did it, but you are a genius! Thank you sooo much. It works perfectly!

    Will also see how to add a scroll bar on the owner list box as it looks like we'll have more than 20 names.

  10. #10
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: message input box returns lines/rows based on the input

    Quote Originally Posted by excelandclark View Post
    Will also see how to add a scroll bar on the owner list box as it looks like we'll have more than 20 names.
    A scroll bar will appear automatically if the list exceeds the visible listbox.

    Glad to help.

    Note: Please mark the thread as solved.

  11. #11
    Registered User
    Join Date
    05-07-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: message input box returns lines/rows based on the input

    Hello coretroy. my table is almost finished thanks to you.

    perhaps you could help me how to add a click button to reset the filters on the left side or somewhere in this table (such as inserting a column on the left of coulmn A). thanks

  12. #12
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: message input box returns lines/rows based on the input

    There is a reset button in the quick access toolbar (Far Top Left of screen).
    Mouse over them to see what they do.

    I think it was the 2Green arrows.

    You may need to add this to the reset code:
    Please Login or Register  to view this content.
    For some reason it was missing.
    Module_2 should be:
    Please Login or Register  to view this content.
    Last edited by coreytroy; 05-30-2013 at 10:31 PM.

  13. #13
    Registered User
    Join Date
    05-07-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: message input box returns lines/rows based on the input

    Thanks coreytroy. is there a way also to make the listbox categories in alphabetical order? like the names of the owner in listbox 1 and categories in listbox2? thanks a bunch.

  14. #14
    Registered User
    Join Date
    05-07-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: message input box returns lines/rows based on the input

    Hi Coretroy.. is there a chance for this to be converted to 2003?

+ 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