have a qustion abou VBA macros: How can I access worksheets cells from VBA macro placed in [My macros and dialogs].basic (or other library)? Macro below works if is placed in [TestFile.xls].VBAProject but does not work in [My macros and dialogs].basic. The error message is : BASIC runtime error. '35' cells Rem Attribute VBA_ModuleType=VBAModule Option VBASupport 1 Sub Test() Cells(1, 1).Value = Time() End Sub
reproduced in 3.5.3 on Fedora 64 bit
@ Noel What do You think about this bug?
'Option VBASupport 1' is not enough for vba macros to work, there are many temporary objects and relationships set up as part of importing say an excel document. Some VBA code may work when that option is selected others not, your mileage may vary. ( in general you should just assume vba code will not work at all with native libreoffice documents ) As such attempting to run any vba enabled code in application libraries will never work and that is intentional, it makes no sense, VBA for excel/word etc. is in any case document-centric
Thanks for explanations. But why error 35? May be there should be some text like "VBA not allowed in Library" instead of 35?
(In reply to comment #4) > Thanks for explanations. > But why error 35? May be there should be some text like "VBA not allowed in > Library" instead of 35? it's not that the 'option VBASupport' isn't allowed, it's just that it will not and cannot do anything useful.