Created attachment 142969 [details]
Example file from Excel with a Validity value set as macro condition
If we try to run the macro in the attached file, the Sheets will not hide if we set the L9 cell to OK using validity setting and the Object Catalog will not work correctly.
Steps to reproduce:
1. Create a new spreadsheet with Microsoft Excel 2016/2013
2. Set a validity for a cell (“L9”) and choose the List type. Set two value (OK and NOT OK)
3. Create 8 Sheets.
4. Add this macro code to the Sheet1:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Me.Range("L9").Address Then
If Target.Value = "OK" Then
Sheets("Munka8").Visible = True
Sheets("Munka7").Visible = True
Sheets("Munka6").Visible = True
Sheets("Munka5").Visible = True
Sheets("Munka8").Visible = False
Sheets("Munka7").Visible = False
Sheets("Munka6").Visible = False
Sheets("Munka5").Visible = False
5. Set the value of the “L9” cell to “OK” and NOT OK. (It will work)
6. Save the file as *.XLSM.
7. Open the file with LibreOffice Calc and set the value of the “L9” cell to “OK” and “NOT OK”. (It will not work)
8. Save as the file in LibreOffice Calc.
9. Open in Microsoft Excel.
Actual results: The macro does not work. If we open the file in LibreOffice Calc and open the Object Catalog, we can see the Document Objects. But If we double click on the “Sheet1” (we use a macro here) LibreOffice adds a new Sheet1 module to the Modules and we cannot open our macro code from the Object Catalog. If we save the file and reopen with Microsoft Excel the Object Catalog will be completely wrong.
The macro should work and the Object Catalog should work correctly if we want to open a Document Object.
Build ID: 29228e83df009cf76ac819ed024527be1092f065
CPU threads: 4; OS: Windows 6.1; UI render: default;
TinderBox: Win-x86@42, Branch:libreoffice-6-0, Time: 2017-12-04_23:15:34
Locale: hu-HU (hu_HU); Calc: group threaded
Created attachment 142970 [details]
The example file saved by Calc
Created attachment 142971 [details]
The original and the saved file in Excel and Calc side by side
Created attachment 142972 [details]
The original and the exported files structure in Excel
Repro with document
Win 8.1 32-bit
LibreOffice Version: 184.108.40.206.alpha0+
Build ID: e1a77d0affef507d597e7dceb5514073658332df
CPU threads: 4; OS: Windows 6.3; UI render: default;
TinderBox: Win-x86@42, Branch:master, Time: 2018-06-27_04:47:54
Locale: fi-FI (fi_FI); Calc: group threaded
Version: 220.127.116.11 (x64)
Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: en-AU (en_AU); UI: en-US