In the VBA module below, can you write me a module that can be called when 'MsgBox "Location found in row " & i & vbCrLf & "Row value in column G: " & ws.Cells(i, 7).Value & vbCrLf & vbCrLf & "Please head towards - " & ws.Cells(i, 4).Value & vbCrLf & vbCrLf & "Double Click column H to return to the Top of the Page", vbInformation, "ADDRESS FOUND"'
that will do the following:
in sheet 'Activations' in the next available row,
write the current date to & time to column A
and write 'ws.Range(ws.Cells(i, 1), ws.Cells(i, 7))' to column B


Sub SearchParameters()
Application.EnableEvents = False
    Me.Unprotect Password:="edit"
    Dim ws As Worksheet
    Dim searchValue1 As String
    Dim searchValue2 As String
    Dim searchKeyword As String
    Dim found As Boolean
    Dim i As Long
    Dim lastRow As Long
    Dim instanceCount As Integer ' Initialize instanceCount variable
    Dim matchRow As Long ' Track the row number for matches
    
    Set ws = ThisWorkbook.Sheets("List Format")
    matchRow = 15 ' Start writing matches from row 15 in column J

    ' Clear all background colors in the range A2:G612
    ws.Range("A2:G612").Interior.ColorIndex = xlNone

    ' Construct search values from H3, H5, and H7
    searchValue1 = Trim(ws.Range("H3").Value) & " " & Trim(ws.Range("H5").Value)
    searchValue2 = Trim(ws.Range("H7").Value)
    searchKeyword = LCase(Trim(ws.Range("H9").Value))

    ' Find the last row in column A
    lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row
    found = False
    instanceCount = 0 ' Initialize instanceCount

    ' Loop through each row to search for the combination of H3 & H5 with H7
    For i = 2 To lastRow
        If ws.Cells(i, 1).Value = searchValue1 Then
            If ws.Cells(i, 2).Value = searchValue2 Then
                ' If the combination of H3 & H5 with H7 is found
                found = True
                'MsgBox "Location found in row " & i & vbCrLf & "Row value in column G: " & ws.Cells(i, 7).Value & vbCrLf & "Double Click column H to return to the Top of the Page"
                MsgBox "Location found in row " & i & vbCrLf & "Row value in column G: " & ws.Cells(i, 7).Value & vbCrLf & vbCrLf & "Please head towards - " & ws.Cells(i, 4).Value & vbCrLf & vbCrLf & "Double Click column H to return to the Top of the Page", vbInformation, "ADDRESS FOUND"
                ws.Range(ws.Cells(i, 1), ws.Cells(i, 7)).Interior.Color = RGB(255, 255, 0) ' Highlight in yellow
                ws.Range(ws.Cells(i, 1), ws.Cells(i, 7)).Select
                Exit For
            End If
        End If
    Next i

    ' If the combination of H3 & H5 with H7 is not found, and H9 is found, restrict the search for H9 to the same rows where H3 & H5 are found
    If Not found And Trim(ws.Range("H9").Value) <> "" Then
        For i = 2 To lastRow
            If InStr(1, LCase(ws.Cells(i, 3).Value), searchKeyword) > 0 And ws.Cells(i, 1).Value = searchValue1 Then
                found = True
                instanceCount = instanceCount + 1
                ws.Range(ws.Cells(i, 1), ws.Cells(i, 7)).Interior.Color = RGB(255, 255, 0) ' Highlight in yellow
                
                'ws.Cells(matchRow, 10).Value = "Location found in row " & i & ", G: " & ws.Cells(i, 7).Value & ": " & ws.Cells(i, 4).Value
                ws.Cells(matchRow, 10).Value = ws.Cells(i, 7).Value & ": " & ws.Cells(i, 4).Value
                matchRow = matchRow + 1 ' Move to the next row in column J
                
            End If
        Next i

        ' Select the row if only one instance is found
        If instanceCount = 1 Then
            For i = 2 To lastRow
                If InStr(1, LCase(ws.Cells(i, 3).Value), searchKeyword) > 0 And ws.Cells(i, 1).Value = searchValue1 Then
                    ws.Range(ws.Cells(i, 1), ws.Cells(i, 7)).Select
                    Exit For
                End If
            Next i
        End If
    End If

    ' If H3 & H5, H7, and H9 are not found together, highlight all rows with the value of H9 in column C
    If Not found And Trim(ws.Range("H9").Value) <> "" Then
        searchKeyword = LCase(ws.Range("H9").Value)
        instanceCount = 0 ' Reset instanceCount before counting
        
        For i = 2 To lastRow
            If InStr(1, LCase(ws.Cells(i, 3).Value), searchKeyword) > 0 Then
                found = True
                instanceCount = instanceCount + 1
                ws.Range(ws.Cells(i, 1), ws.Cells(i, 7)).Interior.Color = RGB(255, 255, 0) ' Highlight in yellow
                
                'ws.Cells(matchRow, 10).Value = "Location found in row " & i & ", G: " & ws.Cells(i, 7).Value & ": " & ws.Cells(i, 4).Value
                ws.Cells(matchRow, 10).Value = ws.Cells(i, 7).Value & ": " & ws.Cells(i, 4).Value
                matchRow = matchRow + 1 ' Move to the next row in column J
                
            End If
        Next i

        ' Select the row if only one instance is found
        If instanceCount = 1 Then
            For i = 2 To lastRow
                If InStr(1, LCase(ws.Cells(i, 3).Value), searchKeyword) > 0 Then
                    ws.Range(ws.Cells(i, 1), ws.Cells(i, 7)).Select
                    Exit For
                End If
            Next i
        End If
    End If

    ' Check if any locations have been found
    If Not found Then
        MsgBox "Location Not Found" & vbCrLf & "Double Click column H to return to the Top of the Page", vbExclamation, "NO MATCH"
    End If
    Me.Protect Password:="edit"
    Application.EnableEvents = True
End Sub