0
    Dim WB As Workbook
    Dim URL As Variant
    Dim Sh As Worksheet
    Dim WB1 As Workbook
    Dim i As Integer
    Dim LR As Long
    Dim stext As String
    ThisWorkbook.Activate
    Set WB = ThisWorkbook
    URL = "https://Training%20Materials/Admin%20recurring%20request%20Handbooks/Test/Updated%20Quality%20Tracker.xlsx?d=w68cd37bd0505426fb4d6fe38c21e23a8"
    Set WB1 = Workbooks.Open(URL)
    Debug.Print WB1.FullName
    Set WB1 = ActiveWorkbook
    WB1.LockServerFile
    sReturn = InputBox("Please enter the Search# ") ' I want to copy this search#
    'Clipboard.SetText (CStr(totalYields))
    Clipboard.SetText (CStr(totalYields)) 'but this is not allowing me to store if I use set stext
    WB1.Activate
    Range("A1").Select
    On Error GoTo 0
    Cells.Find(What:=stext, After:=ActiveCell, LookIn:=xlFormulas2, _
            LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
            MatchCase:=False, SearchFormat:=False).Activate
    ActiveCell.Select
    ActiveCell.EntireRow.Delete
    Dim msgvalue As VbMsgBoxResult
    msgvalue = MsgBox("The information related to Search# provided has been deleted", vbOKOnly)
    msgvalue = MsgBox("Please continue to update fresh entries and submit")
    0:
End sub

As mentioned above , please provide solution to store the input message box value and use it to search in other excel workbook

Scott Craner
  • 148,073
  • 10
  • 49
  • 81
  • Can anyone please help????? –  Aug 25 '21 at 15:27
  • Also If the search# is not found, then it should display the message "no Search# found" –  Aug 25 '21 at 15:42
  • Haven't received any response, please help –  Aug 25 '21 at 17:28
  • Anyone out there? –  Aug 25 '21 at 18:14
  • Y was my question unanswered by anyone –  Aug 26 '21 at 04:47
  • 1
    `Haven't received any response, please help – Nishanth S 13 hours ago Anyone out there? – Nishanth S 13 hours ago Y was my question unanswered by anyone – Nishanth S 2 hours ago` People are not at your beck and call :) Most of us here are volunteers from different timezones. We do not get paid for assisting others. So I would recommend showing a little patience. If you don't have time and really need this urgently then I recommend posting this on site like Freelancer.com. – Siddharth Rout Aug 26 '21 at 07:17
  • Now regarding your question. It is very easy to achieve what you want. I would recommend 2 links to start with [How to avoid using Select in Excel VBA](https://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba) and [How to use .Find](http://www.siddharthrout.com/index.php/2018/01/05/find-and-findnext-in-excel-vba/) Give it a try and if you are stuck then post the new code with error messages if any and I will defintiely help you :) – Siddharth Rout Aug 26 '21 at 07:18
  • Do you set `stext` to anything? `sReturn` is the inputbox value? – Nathan_Sav Aug 26 '21 at 07:23

0 Answers0