[Libreoffice-bugs] [Bug 52601] New: Excel Visual Basic code compatibility issue in LibreOffice Calc: If Not ... Like … Then

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jul 28 04:46:39 CEST 2012


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

             Bug #: 52601
           Summary: Excel Visual Basic code compatibility issue in
                    LibreOffice Calc: If Not ... Like … Then
    Classification: Unclassified
           Product: LibreOffice
           Version: 3.5.5.3 release
          Platform: All
        OS/Version: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
        AssignedTo: libreoffice-bugs at lists.freedesktop.org
        ReportedBy: Tor24_1975314 at t-online.de


Created attachment 64803
  --> https://bugs.freedesktop.org/attachment.cgi?id=64803
Excel file with macro

In some cases Excel Visual Basic code in LibreOffice working with additional
parenthesize only!

Example for "If", the following code works in Excel but not in Calc:
If Not LCase(Range("A1").Value) Like "*date*from*to*" Then

This code works in Calc:
If Not (LCase(Range("A1").Value) Like "*date*from*to*") Then

Example macro:
Sub Test_LIKE_not_ok()
    ' Preparing Test:
    Range("A2").FormulaR1C1 = "Date from 12.01.2001 to 31.12.2020"
    Range("A2").Select

    ' Testing Excel VBA Code in Libre Office:
    If Not LCase(Range("A2").Value) Like "*date*from*to*" Then
        MsgBox "Muster '*date*from*to*' not found!"
    Else
        MsgBox "Muster '*date*from*to*' found!"
    End If
End Sub

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Libreoffice-bugs mailing list