UserForm to Search Workbook

BrendanDixon

Board Regular
Joined
Mar 7, 2010
Messages
174
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi All,

I have a userform called "Search" I have a textbox called "TextBox1"
and a button called "CommandButton1" I would like to have some programming that what ever I type in the text box and then press the button it will go to the cell with with the same text. while keeping the userform on top. if I click on the button again it will go to the next value of the text in the text box. My workbook has multiple sheets and I want the search to ignore Case differences.

Does anyone know how to do this and could you please help me. I do not know where to start with this.
 
Hello Alan, thank you for your reply.

The trouble is, that does not fit in with the functionality of the userform. The user is forced to scroll through a long list of columns and pick and choose using a listbox. It does not make the best use of the space either.

I have an example of your way vs my proposed way:

yTogjiY.png


UrqAWfv.png


Also, the column headers shown should be selected/deselected after the results appear, they user shouldn't be forced to choose them before searching. The functionality you have provided is the reverse of what is required.

Does this make sense?

Amended design proposal: https://www.dropbox.com/s/co8hljozxca3div/Copy of AltBKContacts.xlsm?dl=0

Hi Sheepdip,
ok, comments taken on board, have amended the code to include the checkboxes, note that I've renamed these to simplify the coding. The checkboxes idea is good in that the user can see at a glance which fields are displayed, however I'd have liked to have created a (hidden) sheet for the listbox results, allowing us to show headings. All the checkboxes are initially ticked, and the search box will be hidden if there are NO checkboxes ticked.
The code will only search ticked headings.
https://db.tt/2GAIjLek9W
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hello Alan, thank you for the update. That works quite well!

I have updated the design and enabled all tickboxes by default. It would be better if the search box was always displayed rather than being hidden now that they are all selected by default. I'm not sure how this can be implemented.

https://www.dropbox.com/s/co8hljozxca3div/Copy of AltBKContacts.xlsm?dl=0

Could you please add that functionality to the 'Update' tab though, so it only shows the buttons once a selection is made from the combobox?
 
Upvote 0
Hello Alan, I hope you are well. I notice that you have not replied for some time. Could you please get back to me when it is convenient? Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,620
Messages
6,179,928
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top