Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code question
Does the worksheet have to active for this code to work?
Private Sub BtnDelete_Click() Dim fRow As Long On Error GoTo ender fRow = Columns(1).Find(What:=TxtMan.Value, _ After:=Cells(5000, 1), 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 Because if it does not then it doesn't work. Right now it requires it to be and I would like to knwo how to make so it doesn't need the sheet to be active? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA code question | Excel Discussion (Misc queries) | |||
Code Question | Excel Discussion (Misc queries) | |||
Another code question | Excel Discussion (Misc queries) | |||
VBA code question | Excel Discussion (Misc queries) | |||
Code Question | Excel Programming |