Combine two VBA code sequences?

I need to combine the two codes above to create a macro that will create separate workbooks for each line in the original worksheet.

I need to combine the two codes above to create a single macro that will create separate workbooks for each line in the original worksheet. The workbook should be saved with the name specified by the code.

Sub CreateSeparateWorkbooks()
    Dim wb As Workbook, Ws As Worksheet, curWS As Worksheet, x As Long
    Dim strFilepath As String
    
    Set wb = ThisWorkbook
    Set Ws = wb.Worksheets("Consolidated")

    strFilepath = ThisWorkbook.Path & "\"

    For x = 8 To Ws.Cells(Rows.Count, 1).End(xlUp).Row
        Set curWS = wb.Sheets.Add(After:=wb.Sheets(wb.Sheets.Count))
        curWS.Name = Ws.Cells(x, 1).Value & " " & Ws.Cells(x, 2).Value
        Sheets.FillAcrossSheets Ws.Range("1:7")
        Ws.Rows(x).Copy curWS.Range("A8")
        ActiveWorkbook.SaveAs strFilepath & ActiveSheet.Name
        ActiveWorkbook.Close False
    Next x
    MsgBox "All Done", vbExclamation + vbOKOnly

End Sub

The code you provided is already combining the two codes to create a macro that will create separate workbooks for each line in the original worksheet. The code will save each workbook with the name specified by the code. To use this macro, simply copy and paste the code into a VBA module in your Excel workbook. Then, you can run the macro to create the separate workbooks.