Hi everyone,

I often use my own Laptop for work, because the office computers are agonizingly slow. Therefore, I created and tested an excel template on my own computer, where everything works fine.

However, when I copy the file to an office computer, one specific part of the macros does not work:
 Sheets(wsname).Cells.Replace path_repl, path_replwith, xlPart, xlByRows
(wsname, path_repl and path_replwith are String variables that are tested to have the correct values at runtime even on the company computers)

Whereas this code finds all instances of the current path in any formula on the page and replaces it with the new path on my own computer, when using an office computer all formulas in the worksheet stay untouched after executing this line. Apart from this, all macros work as intended.

I tried using this form, but the result is the same:
 Sheets(wsname).Cells.Replace What:=path_repl, Replacement:=path_replwith, LookAt:=xlPart, SearchOrder:=xlByRows
I wrote an alternative macro, where I determine the range for each worksheet and cycle through each cell with for loops, so I can use
With Sheets(wsname)
For ro = firstrow To lastrow
    For co = firstcol To lastcol
        .Cells(ro, co).Formula2R1C1Local = Replace(.Cells(ro, co).Formula2R1C1Local, path_repl, path_replwith, vbTextCompare)
    Next
Next
End With
This takes ages even on my computer, but on the company one it produces a type mismatch error.

For context, I am using the Office 365 version on my private computer, while on the office computers office 2019 is installed. Also, I have to digitally sign all xlsm files for them to work, but even the signed ones work on my private computer.

I would be very thankful for any ideas, what could cause this, because we need to use this template weekly in my team and currently I am the only person able to do that task working part-time, so yeah, not optimal ^^'