Morning,
Having Trouble putting message box when my Text search result turns nothing found. tried doing if statement different ways but had no luck getting it to work. what it is doing is after if finds the Value from text box it will copy 7 rows down and 3 columns over and paste it on sheet 2 from sheet 5. Still need to add Screen control was waiting till i got it all done. included pics of the both sheets.
here is the Code that currently works to pull data from sheet5(Data Dump 2) to sheet2(Broker Search). just want a message box if it finds nothing instead of error you normally get.
Sub SearchStop5()
Sheets("Data Dump 2").Visible = True
Sheets("Data Dump 2").Select
Range("A1").Select
Range("A3").EntireColumn.Select
Selection.Find(What:=Sheet2.Cells(2, 4).Value, After:=ActiveCell, LookIn:=xlValues, _
Lookat:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Select
ActiveCell.Range("A1:C7").Select
Selection.Copy
Sheets("Broker Search").Select
Range("G19").Select
ActiveSheet.Paste
Sheets("Data Dump 2").Visible = False
End Sub
Thanks
Having Trouble putting message box when my Text search result turns nothing found. tried doing if statement different ways but had no luck getting it to work. what it is doing is after if finds the Value from text box it will copy 7 rows down and 3 columns over and paste it on sheet 2 from sheet 5. Still need to add Screen control was waiting till i got it all done. included pics of the both sheets.
here is the Code that currently works to pull data from sheet5(Data Dump 2) to sheet2(Broker Search). just want a message box if it finds nothing instead of error you normally get.
Sub SearchStop5()
Sheets("Data Dump 2").Visible = True
Sheets("Data Dump 2").Select
Range("A1").Select
Range("A3").EntireColumn.Select
Selection.Find(What:=Sheet2.Cells(2, 4).Value, After:=ActiveCell, LookIn:=xlValues, _
Lookat:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Select
ActiveCell.Range("A1:C7").Select
Selection.Copy
Sheets("Broker Search").Select
Range("G19").Select
ActiveSheet.Paste
Sheets("Data Dump 2").Visible = False
End Sub
Thanks