When I change some value in my cell, the undo option is not available.
Is it because I have vba programming code in background and how can I enable undo?
Another question. When I try to save excel file it offers me xltm format.
Since I don't have any macro (but i have vba code) i have saved it as xlsx.
It looks that everything works for now, also vba code in background.
What is the difference between xltm and xlsx format if there is any?
Are you changing the cell value using code?
Regarding the file types, xltm will almost certainly be a Macro-enabled template. From 2007 onwards the two main file types are xlsx and xlsm. XLSX, will not contain any VBA, XLSM are Macro-Enabled and can contain VBA.
Unfortunately, after running a macro, the cached info for the Undo is erased. It is how Excel+Vba works.
However, inside a procedure(Vba) and before it ends, you can use the line Application.Undo
to undo the last action. But as soon as the VBA procedure ends and returns control to Excel, there is no Undo anymore.
XLSM is the file format that allows the spreadsheet to have macros.
XLSX is the spreadsheet file format without macros. No .xlsx file can have macros.
In your case probably the code is inside an Add-In or in the personal.xlsb file. In such a case, the vba code is available to use in any Excel file regardless of it being .xlsm, .xlsx, etc.