Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can anyone tell me why my code below only deletes data from worksheet April
and not all of the selected worksheets? I intend that the TextBox1 value be found on all selected worksheets and be replaced by nothing, in effect removing the data from all worksheets. Private Sub CommandButton1_Click() x = TextBox1.Value If ActiveSheet.Name = "April" Then Sheets(Array("April", "May", "June", "July", "August", "September")).Select Cells.Replace What:=x, Replacement:="", LookAt:=xlWhole, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Sheets("April").Select End If Unload UserForm1 End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
search and replace | Excel Discussion (Misc queries) | |||
Search and replace | Excel Worksheet Functions | |||
Search and Replace Problem | Excel Programming | |||
Problem with search and replace data,thanks for you help in advance. | Excel Discussion (Misc queries) | |||
Search and Replace | New Users to Excel |