Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is what I have. I have a user form that the user has to enter names in
and the add button works fine it copies all the textbox infor to sheet 'MANCODE' which gets sorted by a worksheet change event also the change event code numbers the entries an assigns the next higher number to column A of that row before it sorts column B which happens to be where textbox 'TxtMan' gets sent to. Now what I want to do is when the user clicks the enters a name in the TxtMan textbox and clicks delete it will seach column B for the name and then clears all the contents of the row including row A. I also need the click event to resort and assign new numbers after it deletes the row. "Tom Ogilvy" wrote: You are saying your are deleting an entirerow, but the cell of that row in column A is not deleted - I couldn't reproduce that, even with column A hidden. The code worked fine for me: xl2003 -- Regards, Tom Ogilvy "Mekinnik" wrote: Why will the following code not delete column A in addition to the other columns? Dim fRow As Long On Error GoTo ender fRow = Columns(2).Find(What:=txt1.value, _ After:=Cells(1, 2), LookIn: =xlFormulas, _ LookAt:=xlWhole, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, MatchCase:=False, _ SearchFormat:=False).Row Rows(fRow).Delete Exit Sub ender: MsgBox "Value not found" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with code | Excel Programming | |||
Problem with code | Excel Programming | |||
Help with code problem | Excel Programming | |||
vba code problem | Excel Programming | |||
Code Problem ! | Excel Programming |