[Libreoffice-bugs] [Bug 139939] vba compatible copying worksheets to a new workbook doesn't work for more than one sheets

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Feb 11 16:15:24 UTC 2021


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

--- Comment #3 from Harald Langheinrich <Hal71229 at gmail.com> ---
copy without a target has destination activeworkbook and activeworkbbok has as
method .saveas

this is an example from microsoft

Worksheets(Array("Sheet1", "Sheet2", "Sheet4")).Copy
With ActiveWorkbook
     .SaveAs Filename:=Environ("TEMP") & "\New3.xlsx",
FileFormat:=xlOpenXMLWorkbook 
     .Close SaveChanges:=False 
End With 


in open office with option VBASupport on this is also possible, but an error is
generated and the last page in the array disappears from the new workbook.
That's what i'm talking about.

if I use  on error resume next everything is working as expected!!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210211/aaa6c167/attachment.htm>


More information about the Libreoffice-bugs mailing list