+ Reply to Thread
Results 1 to 4 of 4

UserForm Search Specific Sheet based on ComboBox

  1. #1
    Forum Contributor
    Join Date
    10-30-2006
    MS-Off Ver
    O365
    Posts
    311

    UserForm Search Specific Sheet based on ComboBox

    Hi all,
    I have created a UserForm to search my workbook.

    My UserForm is set up as follows:

    (Label) Study: (ComboBoxstudy) A pre-defined list
    (Label) Name: (Textname1) This is the user search criteria
    Followed by a command button named search

    The ComboBoxstudy options are also the names on my sheets.
    So when someone chooses, lets say, 'annexa4' from the combobox and types 'dave' in the textbox I would like the search to search of dave (or Dave) in the sheet called annexa4. I would like the userform to remain open so the user can click search again to find the next dave... and so on. (dave will only appear in either column A or B of the sheet).

    I have this code but it only searches my current sheet because i don't know how to include the combobox:
    Please Login or Register  to view this content.
    I'm probably way off my goal here so if anyone can help, i would really appreciate it.

    Kind regards
    Stuart

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: UserForm Search Specific Sheet based on ComboBox

    Change With Cells to With Sheets(ComboBox1)


    Kind regards
    Leo

  3. #3
    Forum Contributor
    Join Date
    10-30-2006
    MS-Off Ver
    O365
    Posts
    311

    Re: UserForm Search Specific Sheet based on ComboBox

    Hi Leo,
    That pulls an error for me.

    I found this other code that does search the correct sheet but how would i add a loop to search for the next instance if the first instance isn't the one i'm looking for?

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: UserForm Search Specific Sheet based on ComboBox

    maybe post youre file, and someone
    will do for you, me back in 10 hours

    Cheers
    Leo

+ 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. UserForm Search Specific Sheet based on ComboBox
    By jimmisavage in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-26-2017, 07:24 AM
  2. Search UserForm with ComboBox in specific sheet
    By jimmisavage in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-21-2017, 04:47 PM
  3. Filter userform combobox based on specific criteria
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-09-2015, 03:38 PM
  4. VBA UserForm - Contact sheet; Using a ComboBox array to write data to specific column
    By willmason in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2014, 09:44 AM
  5. UserForm Combobox Wild Search Filter based on first letter entry
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-23-2014, 08:17 AM
  6. Lookup part of textstring in Userform ComboBox and search for value in sheet range
    By Michael2008 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2014, 05:40 AM
  7. [SOLVED] Save and Send Userform data to a specific email address based on Combobox value
    By GAMU in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-30-2013, 01:13 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