I have a main workbook that extracts data from other workbook sheets, then closes the modified workbook suppressing the save option.
other_wb.Close Savech
Savechanges
is an undefined variable. It is therefore Empty
; Empty
is falsy, so the expression Savechanges = False
evaluates to True
, so the call becomes other_wb.Close True
, which saves the file.
You are missing the colon:
other_wb.Close Savechanges:= False
Put Option Explicit
on top of all your code modules to never have to deal with this kind of issues.