Strange unless I am doing something wrong... When Application.Run calls "Green" I get an error "macro does not exist. If I name it anything other than Green (including other color names) it works ok. It also works if I call it by running... Application.Run Green instead of Application.Run "Green". REM - Does not work Option VBASupport 1 Sub Green() msgbox "You called the Green macro!" End Sub Sub test() Application.Run "Green" End Sub REM - Works Option VBASupport 1 Sub Green() msgbox "You called the Green macro!" End Sub Sub test() Application.Run Green End Sub REM - Works Option VBASupport 1 Sub Greenx() msgbox "You called the Green macro!" End Sub Sub test() Application.Run "Greenx" End Sub
Noel, please have a look, I'm not sure if this is bug or feature
I'll take a look, sounds weird, I would nearly bet there is some RTL 'Green' function that is causing confusion
Green, Red and Blue are build-in Basic functions, see alphabetic list in the help.
Well that would make the VBA macros incompatible with excel I believe. This came in from an excel sheet where it worked.
Is there a way to restore VBA compatibility without breaking applications that use Red/Green/Blue from the basic runtime? Perhaps detecting Option VBASupport 1 is enough? Also shouldn't the error message be something more like "Macro already exists" than "Macro does not exist"?
(In reply to comment #5) > Is there a way to restore VBA compatibility without breaking applications that > use Red/Green/Blue from the basic runtime? Perhaps detecting Option VBASupport > 1 is enough? > there is and I thought that I fixed this issue previously ( or at least the rtl function visibility part ) :-/ There was previously a flag that could be set to flag mark an RTL function to be only available in compatibility mode, I extended that to also be able to set a flag to mark a function only available in 'libreoffice' basic mode. ( see. _COMPTMASK, _COMPATONLY & _NORMONLY ) in basic/source/runtime/stdobj.cxx ) however it seems this does not work as expected at the moment, the behaviour currently is that a function deemed to be available in compatibility mode is indeed not available until 'Option VBASupport 1' is set, however once that option is enabled the function is available forever more ( until the office is restarted ). Similarly a function that is specified as unavailable in compatibility mode will be unavailable as long as 'Option VBASupport 1' is specified, but... after the first time the function is called in non-compatibility mode then the function will always be found. It seems that in openoffice the previous incarnation ( e.g. setting a function to be available in compat mode only ) also exhibits the same problem. Its not clear whether this was always the behaviour or not ( clearly it's not desirable ) Not even sure what the correct > Also shouldn't the error message be something more like "Macro already exists" > than "Macro does not exist"? one might say that probably should be a compile time error, but I doubt that the basic compiler is smart enough to realise this as it resolves nearly everything at runtime. Note: there seems to be an additional problem here in that Application.Run "Green" will not resolve, the current implementation expects at least the Module to be specified ( note: in a standalone example e.g not an imported document you would need to specify the complete location Application.Run "Standard.Module1.Green" as the project name is not correctly set up )
Please read this message in its entirety before responding. Your bug was confirmed at least 1 year ago and has not had any activity on it for over a year. Your bug is still set to NEW which means that it is open and confirmed. It would be nice to have the bug confirmed on a newer version than the version reported in the original report to know that the bug is still present -- sometimes a bug is inadvertently fixed over time and just never closed. If you have time please do the following: 1) Test to see if the bug is still present on a currently supported version of LibreOffice (preferably 4.2 or newer). 2) If it is present please leave a comment telling us what version of LibreOffice and your operating system. 3) If it is NOT present please set the bug to RESOLVED-WORKSFORME and leave a short comment telling us your version and Operating System Please DO NOT 1) Update the version field 2) Reply via email (please reply directly on the bug tracker) 3) Set the bug to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link: https://wiki.documentfoundation.org/QA/BugTriage There are also other ways to get involved including with marketing, UX, documentation, and of course developing - http://www.libreoffice.org/get-help/mailing-lists/. Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later): https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for your help! -- The LibreOffice QA Team This NEW Message was generated on: 2015-07-18
Hi Noel, I'm setting this ticket back to NEW as it has been inactive for more than 3 months. Feel free to assign it back to you if you're still working on this. Regards
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.4.1 or 5.3.6 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20170929
(In reply to jkonecny from comment #0) > REM - Does not work > Option VBASupport 1 > Sub Green() > msgbox "You called the Green macro!" > End Sub > > Sub test() > Application.Run "Green" > End Sub This works for me on Linux. If someone can still reproduce, set back to NEW Arch Linux 64-bit Version: 6.4.0.0.alpha0+ Build ID: 37fc9f51a8de11d40632e8cda17ccf1fa4b1f503 CPU threads: 8; OS: Linux 5.2; UI render: default; VCL: gtk3; Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US Calc: threaded Built on 6 August 2019