Summary: | Macros: VBA loop While ActiveCell <> "" don't work on Libreoffice | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Alejandro Moreno <almorca> |
Component: | BASIC | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | raal, serval2412 |
Version: | 4.2.2.1 release | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | BSA | ||
i915 platform: | i915 features: | ||
Attachments: |
Excel with a loop do with While ActiveCell <> ""
Example with macro loop. |
Once Security is set to "Medium", I tried to click the button, nothing. Then I tried to "Tools/Macros/Run macro, selected VBA Project/Modulo1/Boton1 and it worked. It looks like the button has no macro assigned. (In reply to comment #1) > Once Security is set to "Medium", I tried to click the button, nothing. > Then I tried to "Tools/Macros/Run macro, selected VBA Project/Modulo1/Boton1 > and it worked. > It looks like the button has no macro assigned. I do the same and it works but there is another error. If you click the button "Fila libre" it return alternately 8 and 15 when the correct answer is 14. Created attachment 97477 [details]
Example with macro loop.
I add a new example loop that don't work in Libreoffice calc.
The code contain a loop:
Range("c2").Select
While ActiveCell <> ""
If parent = ActiveCell.Value Then
check = check + 1
End If
ActiveCell.Offset(1, 0).Select
Wend
but the Libreoffice don't in into the while and check is always 0.
I can confirm with Version: 4.3.2.0.0+ Build ID: 25459cb0c9afdf46c3d90ae8ba0b6ffb375f67da TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-3, Time: 2014-08-17_22:48:01 Version: 4.4.0.0.alpha0+ Build ID: 30ae83c268125383866d47a7ee3e4a5dfcf59f71 TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-08-23_22:03:46 BUT weird thing is that this macro works in first run: - open file - open IDE - run macro in step-by-step F8 - While ActiveCell <> "" -> works - run macro again - While ActiveCell <> "" -> don't work |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 97354 [details] Excel with a loop do with While ActiveCell <> "" If you have a VBA macro with a loop with code similar to Range("A1").Select While ActiveCell <> "" 'some code Wend Libreoffice don't in into the While loop. I attached a excel with a button with text "First free cell". In Excel this button return a message with result 22. On Libreoffice this button not to do anything. Operating System: All Version: 4.2.2.1 release