Finally got it right, everything above is so confusing.
    Sub SaveAndClose()
    Dim wb1 As String
    
    Application.Calculation = xlCalculationAutomatic
    
    'this only works if the following equation is in C43 in sheet "data"
    '=LEFT(MID(CELL("filename",C41),SEARCH("[",CELL("filename",C41))+1, SEARCH("]",CELL("filename",C41))-SEARCH("[",CELL("filename",C41))-1),75)
    'the vba equation has double quotes everywhere that is how you use a formula in vba.
'vba code recreates this incase it gets deleted by accident. 
    
    ThisWorkbook.Sheets("Data").Range("C43").ClearContents
    ThisWorkbook.Sheets("Data").Range("C43").Formula2R1C1 = _
            "=LEFT(MID(CELL(""filename"",R[-2]C),SEARCH(""["",CELL(""filename"",R[-2]C))+1, SEARCH(""]"",CELL(""filename"",R[-2]C))-SEARCH(""["",CELL(""filename"",R[-2]C))-1),75)"
        'https://techcommunity.microsoft.com/t5/excel/cell-reference-containing-file-name-changes-when-opening-second/m-p/2417030
    
    wb1 = ThisWorkbook.Sheets("Data").Range("C43").Text
    If ThisWorkbook.Name = wb1 Then
    'MsgBox (wb1)
    Workbooks(wb1).Close SaveChanges:=True
    End If
    
    End Sub
this will allow the spreadsheet to determine its own name and then only then can the sub run something against that name. this is so when you have multiple sheets running duplicate sheets but with different names you don't accidently close the wrong sheet. this is a huge win for CYA in my book.
This will also bypass the overwrite message too, you can have the code automatically run in the background on another workbook while you are working in a different workbook without being affected.