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

--- Comment #7 from Harald Langheinrich <[email protected]> ---
the extract was too short
the options where missing
... and you can run it only once  because NewWorkbook.SaveAs throws an error
when it is already there, in the content I run this part only for the first
time  otherwise always open the existing one.

But I made this extract only to show how I created the file which makes the
problem at opening : 

Option VBASupport 1
Option Compatible
Option explicit


Global AblageVerzeichnis As string
Global BasisVerzeichnis As String 'endet auf "/"
Global AuftragsVerzeichnis As String 'endet auf "/"
Global RechnungsVerzeichnis As String 'endet auf "/"
Global Ergebnis As Variant
Global TestErgebnis As Variant
Global BetriebsSystemName As String
Global SystemName As String

Global Settings_DateiName As String 
Global existiert As Boolean

Sub Settings_sichern()
Dim NewWorkbook

BasisVerzeichnis = ActiveWorkbook.Path & GetPathSeparator() 
Settings_DateiName = "Settings1.xlsx"

'make new workbook
NewWorkbook= Application.Workbooks.Add 
'give it a name
NewWorkbook.SaveAs filename:= BasisVerzeichnis  & Settings_DateiName ,
CreateBackup:=True'give it a name


        'put data in 
        Workbooks(Settings_DateiName).Worksheets(1).Name="Settings-Daten"
        Workbooks(Settings_DateiName).Worksheets(1).Cells(1,1).value =
"AblageVerzeichnis = "
        Workbooks(Settings_DateiName).Worksheets(1).Cells(1,2).value =
AblageVerzeichnis 
        Workbooks(Settings_DateiName).Worksheets(1).Cells(2,1).value =
"AuftragsVerzeichnis = "
        Workbooks(Settings_DateiName).Worksheets(1).Cells(2,2).value =
AuftragsVerzeichnis 

Workbooks(Settings_DateiName).Save
'close it
Workbooks(Settings_DateiName).Close
end sub

-- 
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