I have a need to turn off ThisWorkbook.AutoSaveOn if it is on. Easily done, however if the user opens the workbook using 2013 or earlier, the VBAProject fails to compile. Perfectly understandable.
My question is ... is there a way to code the test in the VBA but "ignored" if not valid?
For example, being able to say (I know it won't work as shown) and have it compile and run on Excel 2013 & even earlier versions ..
Is there a way to run a command in an equivalent manner to formula expression "Indirect("string")"?
Thanks for your help.
My question is ... is there a way to code the test in the VBA but "ignored" if not valid?
For example, being able to say (I know it won't work as shown) and have it compile and run on Excel 2013 & even earlier versions ..
Code:
If Val(Application.Version) > 15 then
if ThisWorkbook.AutoSaveOn then ThisWorkbook.AutoSaveOn = False"
end if
Is there a way to run a command in an equivalent manner to formula expression "Indirect("string")"?
Thanks for your help.