![]() |
Find Function
Hi,
I am currently using User Forms within Excel to enable the user to mov around quicker and easier and I would like to include a function wher the user can delete information. The information which is being delete is located within the Excel spreadsheet however, I am unsure what the will decide to delete. I intend to use the "Find" Function to provid this facility but whenever this function is activated you are require to enter in what you are looking for. Is there anyway in which I can have a text box to enter in th information, click onto a macro which will automatically locate th information that was entered into the text box? I think that it is to do with Strings but not 100% sure. If someone could aide me in my quest I would appreciate it. Many Thanks Kiz -- Message posted from http://www.ExcelForum.com |
Find Function
Sure you can.
Define a button that will trigger the action on the userform, and add this type of code to it findVal = Textbox1.Text Set oCell = Worksheets("Sheet1").Range("A1:A100"). Find _ (findVal) If Not OCell Is Nothing Then oCell.EntireRow.Delete Set oCell = Nothing End If -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "kiza " wrote in message ... Hi, I am currently using User Forms within Excel to enable the user to move around quicker and easier and I would like to include a function where the user can delete information. The information which is being deleted is located within the Excel spreadsheet however, I am unsure what they will decide to delete. I intend to use the "Find" Function to provide this facility but whenever this function is activated you are required to enter in what you are looking for. Is there anyway in which I can have a text box to enter in the information, click onto a macro which will automatically locate the information that was entered into the text box? I think that it is to do with Strings but not 100% sure. If someone could aide me in my quest I would appreciate it. Many Thanks Kiza --- Message posted from http://www.ExcelForum.com/ |
Find Function
Bob,
Thanks for the help. Just what the doctor ordered. Cheers -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 03:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com