It's a VBA Best Practice to always specify which workbook your VBA code refers. If this specification is omitted, then VBA assumes the code is directed at the currently active workbook (ActiveWorkbook).
'--- the currently active workbook (and worksheet) is implied
Range("A1").value = 3.1...