LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 237
Default Conditional Row Deleting

On UserForm3 I have TextBox1, TextBox2, and TextBox3, and
CommandButton1 named "Delete".

On Sheet2 I have a table of data in Range A2:C52.
In this table, ColumnA contains Extensions, ColumnB
contains Employee Names, and ColumnB contains Email
Addresses.

On the UserForm3, TextBox1 looks in ColumnA, TextBox2
looks in ColumnB, and TextBox3 looks in ColumnC.

What I need is for when the user clicks the "Delete"
button on the UserForm, I need the code look on Sheet2
Range A2:C52 to see if there is a match. In this case, a
match would mean the value of TextBox1 matches a value of
a cell in ColumnA in the table, the Value of TextBox2
matches a value of a cell in ColumnB in the corresponding
row, and the value of TextBox3 matches a value of a cell
in ColumnC of the corresponding row. If all the values in
the textBoxes(textBox 1, 2 and 3) match the values of a
cell in Columns A, B, and C in the same row, then I need
for that row in the table to be deleted. If the values of
all 3 Textboxes do not match values of cells in the same
row, then I need for the code not to run and have a
message saying "Not Valid" pop up to the user.

What is the code to make this happen?

Thank you
Todd Huttenstine
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
deleting rows conditional... help!!! laandmc Excel Discussion (Misc queries) 1 September 9th 08 03:36 PM
how prevent formula in cell from deleting when deleting value???? sh-boom New Users to Excel 1 September 30th 05 06:12 PM
Deleting a conditional format Mark Strohmeyer Excel Discussion (Misc queries) 2 December 20th 04 11:39 PM
deleting a conditional format [email protected] Excel Discussion (Misc queries) 4 December 7th 04 10:45 PM
Conditional/selective deleting Tom Ogilvy Excel Programming 0 September 17th 03 02:13 PM


All times are GMT +1. The time now is 09:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"