PDA

View Full Version : Search form with many option



tengkurap
12-26-2008, 07:42 AM
Again...
Help me with this worksheet
I need option to delete that row when i found what am searching with this SearchDialog Form
Anyway thank ....many many thank...

lucas
12-26-2008, 08:50 AM
Not enough information tengkurap. The workbook opens to sheet "testpage" what rows and what searchdialog form?

If there is a language problem maybe you should post this in the Non English Help Forum (http://vbaexpress.com/forum/forumdisplay.php?f=74)

tengkurap
12-26-2008, 09:11 AM
thank Lucas for replay
now i post new example sheet
i mean i want this form have option to delete the row after search value
sorry for bad english
can you modify this form please
thanks

lucas
12-26-2008, 09:46 AM
I added a button to your form since I'm not exactly sure of your goal.

This searches column A looking for the value held in the search textbox and if found deletes the row.

Private Sub CommandButton1_Click()
Dim test As Boolean, x As Long, lastrow As Long, col As Long
Range("A1").Select
col = ActiveCell.Column
lastrow = Cells(65536, col).End(xlUp).Row
For x = lastrow To 1 Step -1
test = Cells(x, col).Text Like txtSearch.Value
If test = True Then Cells(x, col).EntireRow.Delete
Next
End Sub

tengkurap
12-26-2008, 11:31 PM
Mr Lucas
now i post sample my worksheet maybe this can help me more
please replay ok
thank

tengkurap
12-27-2008, 01:25 AM
here my sample sheet

lucas
12-27-2008, 09:33 AM
It's 2007, I don't have 2007......

You didn't comment on the file I posted, why?

tengkurap
12-28-2008, 12:24 AM
Oh am really sorry Mr.Lucas i forget to comment your code
I put your code into my worksheet but not work fine maybe range to be delete it not same,so i post my sample worksheet with additional description hope you can help me more and your help i would be greatly appreciated.
Thank you and Merry-Christmas and Happy New Year....
:beerchug:
and i post another sheet maybe you can help me with this sheet
i want insert 1 column from left ( column A ) but the code not work
please fix for me
thanks again n again...

tengkurap
12-28-2008, 12:38 AM
here another one
: pray2:: pray2:: pray2:
thanks

lucas
12-28-2008, 11:31 AM
I'm sorry but that is a completely different question than you started this thread about.......what am I missing?

Your last two posts didn't even address this thread other than to say that my code didn't work and now you've asked questions that you have already asked in another thread!! I can't help under these circumstances.

Here's where you asked the same question you have now asked at the end of this thread:
http://www.vbaexpress.com/forum/showthread.php?t=24420