Mein Makro zum XML Export hat bisher problemlos funktioniert. Seit einigen Tagen hängt es allerdings. Vielleicht hat jemand eine Idee.
Dim strDateiname As String
Dim strPath As String
Dim z As Long
Dim lngZeile As Long
strPath = "C:\desktop\"
strDateiname = "test.xml"
lngZeile = Range("H" & Rows.Count).End(xlUp).Row
Open strPath & strDateiname For Output As #1 > **** "Laufzeitfehler '55' ****
Print #1, "<?xml version=""1.0"" encoding=""utf-8""?>" & vbNewLine _
& "<exchange xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:noNamespaceSchemaLocation=""http://download.autodesk.com/us/navisworks/schemas/nw-exchange-12.0.xsd"" units=""m"" filename=""myname.nwd"" filepath=""C:\Tools\"">" & vbNewLine _
& " <selectionsets>"
For z = 2 To lngZeile
Print #1, " <selectionset name="""; Cells(z, 8).Value & """ guid=""cejg1e66-a7ee-4d8f-8nn7-2d823ac45a23"">" & vbNewLine _
& " <conditions>" & vbNewLine _
& " <category>" & vbNewLine _
Next z