Jaafar Tribak
Well-known Member
- Joined
- Dec 5, 2002
- Messages
- 9,806
- Office Version
- 2016
- Platform
- Windows
Suppose we have a workbook with the FileFormat xlExcel8 which is the file format that is fully compatible with excel 97-2003.
Now , let's say the file runs some code to disable the Save commandbar control.
There are two possible scenarios :
1- If the workbook happens to be opened in excel 2003 or earlier then the code to disable the Save control is easy as follows:
2- If the workbook is however opened in excel 2007 then the code to disable the Save Control is XML based and the above code will obviously not work.
Question :
Is there a way to have some generic code that will detect in advance the current excel version and then run the code to disable the Save control accordingly ?
Now , let's say the file runs some code to disable the Save commandbar control.
There are two possible scenarios :
1- If the workbook happens to be opened in excel 2003 or earlier then the code to disable the Save control is easy as follows:
Code:
Application.CommandBars.FindControl(, ID:=3).Enabled = False
Question :
Is there a way to have some generic code that will detect in advance the current excel version and then run the code to disable the Save control accordingly ?