https://bugs.freedesktop.org/show_bug.cgi?id=63365

--- Comment #2 from [email protected] ---
Created attachment 80020
  --> https://bugs.freedesktop.org/attachment.cgi?id=80020&action=edit
Test case

Here is a test case.

This is a document imported from excel.

Clicking on the Dollar, Yen, etc checkboxes starts the macros. The macros fail
with a rather uninformative message.

Changing the macros from

Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Sub Dollaro()
    Range("J2:R13,N15:R16").Select
    Selection.NumberFormat = "$ #,##0.00;[Red]-$ #,##0.00"
    Range("A1").Select
End Sub
Sub Yen()
    Range("J2:R13,N15:R16").Select
    Selection.NumberFormat = "¥ #,##0.00;[Red]-¥ #,##0.00"
    Range("A1").Select
End Sub
Sub Euro()
    Range("J2:R13,N15:R16").Select
    Selection.NumberFormat = "€ #,##0.00;[Red]-€ #,##0.00"
    Range("A1").Select
End Sub
Sub Sterlina()
    Range("J2:R13,N15:R16").Select
    Selection.NumberFormat = "£ #,##0.00;[Red]-£ #,##0.00"
    Range("A1").Select
End Sub

To

Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Sub Dollaro()
    Range("J19:R30,N32:R33").Select
    Selection.NumberFormat = "[$$-409]#.##0,00;[RED]-[$$-409]#.##0,00"
    Range("A1").Select
End Sub
Sub Yen()
    Range("J19:R30,N32:R33").Select
    Selection.NumberFormat = "[$¥-411]#.##0;[RED]-[$¥-411]#.##0"
    Range("A1").Select
End Sub
Sub Euro()
    Range("J19:R30,N32:R33").Select
    Selection.NumberFormat = "€ #.##0,00;[RED]-€ #.##0,00"
    Range("A1").Select
End Sub
Sub Sterlina()
    Range("J19:R30,N32:R33").Select
    Selection.NumberFormat = "[$£-809]#.##0,00;[RED]-[$£-809]#.##0,00"
    Range("A1").Select
End Sub

makes things work (in the text above, disregard the fact that the cell ranges
are changed, just look at the format strings)...

When dealing with VBA macros, Libreoffice should not fail on VBA format
strings.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to