when switching between calc documents the VBA enabled api should be aware of the current application specific document type. E.g. the excel interop api should be aware of the last selected ( e.g. current ) calc document. This is not happening at the moment and this can cause for example the api to interact with the wrong document.
Created attachment 66915 [details] test document
Created attachment 66917 [details] another test document open the first and second documents in libreoffice, each document has some content in the A1 cell, "ActiveDocument1" and "ActiveDocument2" respectively. Each document has a button to run a macro which will output the content of cell A1 of the currently active document. So, the expectation is if you click the button of ActiveDocument1 you should get a message box saying "ActiveDocument1" and similarly get a message box saying "ActiveDocument2" if you click the button of document ActiveDocument2. What you will find is that the same message will be displayed which clicking each button. This is because the active document is not updated correctly
Noel Power committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cea414bfe8fe356793778bdf09f5ca3b3a42daa0 fdo#54721 fix vba not tracking currently selected doc correctly The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Noel: can we close this one as fixed?
closing, was fixed, if it's broken again then imo that's a new issue
reopened as bug 71248