https://bugs.documentfoundation.org/show_bug.cgi?id=139939

            Bug ID: 139939
           Summary: vba compatible copying worksheets to a new workbook
                    doesn't work for more than one sheets
           Product: LibreOffice
           Version: 6.4.6.2 release
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Option VBASupport 1
Option Compatible
Option explicit
Sub test
        Dim BasisDateiName As string
        Dim DateiName As String
        Dim PfadName As String
        Dim PfadDateiName As String

        BasisDateiName="WM_ImmobilienService.ods"
        DateiName ="Test.xlsx"
        PfadName="/home/harald/Dokumente/WM_ImmobilienService/Auftrag/"
        'Neue AuftragsMappe erstellen   
        PfadDateiName = PfadName & DateiName

        'On Error Resume Next
               
Workbooks(BasisDatei_Name).Worksheets(Array("Auftrag","Nachweis")).Copy         
                ActiveWorkbook.SaveAs filename:=PfadDateiName
        'on error goto 0

End Sub 

Workbooks(BasisDatei_Name).Worksheets(Array("Auftrag","Nachweis")).Copy
definitly works correctly but throws error 
com.sun.star.container.NoSuchElementException

With On error resume next i can force it to do the expected work like MS-excel

Since last update it does only the first sheet




Steps to Reproduce:
run it

Actual Results:
not usable any more 

Expected Results:
should work as in MS excel without error message !!!


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: de
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes

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

Reply via email to