
لینک کوتاه : https://en.magicfile.ir/?p=2808
Download sample Excel file search in sheet table with form (display all matching items from search in Userform ListBox)
Today, in this post, for you, dear users of the magic file website, we have prepared a sample Excel file for searching in a sheet with a form (showing all matching items from the search in the Userform ListBox) ready for download.
Sample runtime images
روش کار کرد
This time I'm using the Find and FindNext methods to search a table for all results matching my search string. You don't have to use a table, you can just as easily search a range. Find/FindNext allows you to Lets you specify a text string and they will find all occurrences. So if you search for 'Boo' that matches 'Booth', 'Boothroyd', 'Booker' etc. The way Find/FindNext works is to search within a specified range until reaching the end of that range. At this point, the search reaches the beginning of the range and continues the search.
So to stop an infinite search loop, the code must save the address of the first matching cell and then test each subsequent cell until it returns to the first cell.
داده های منبع
- من برخی از داده های ساختگی را در جدولی به نام Table1 ایجاد کرده ام.
- Using the user form, I want to be able to search for a person by first name, last name, location, or department.
- من نتایج، کل ردیف منطبق را به یک ListBox در فرم کاربر برمی گردم.
- You can extend the form's functionality by allowing it to modify or delete records from the table. But for the purposes of this example, I'm just writing the search components.
فرم کاربرSearch
A simple form design with four text boxes where you can enter what you want to search for. The results are listed in the central ListBox, and the three buttons do exactly what they say.
code
For starters, because I'm limiting the search to only one thing at a time - you can't search for both first and last names - when you type something into a text box, everything else gets deleted.
- اگر چیزی را برایSearch مشخص نکنید، این پیام دوستانه را دریافت خواهید کرد.
- پس از وارد کردن عبارتSearchی خود، هر رکورد مطابق فهرست شده است.
- اگر چیزی مطابقت ندارد، فرم به شما این را می گوید.
It is a user form and standalone code that can be adapted or imported into your own project.
برای شما کاربر عزیز پیشنهاد دانلودد داده می شود.
Content tags
Search in Excel sheet , ساخت باکسSearch در اکسل , Creating a search form in Excel through VBA , Search در اکسل , Search در اکسل و codeنویسی آن در VBA , Searchی داده ها در اکسل , فرمSearch در اکسل , Creating a search form in Excel , Search در جدول اکسل ,Files that you may need

Download a sample Excel file to display a list of Iranian cities and towns

Download the sample file listing the website links with Excel

Download a sample file for making a barcode in Excel

Download the sample file of the basic student registration system by selecting the course group in Access

Download sample sales report of store dashboard in Excel
