'*******************************************************************
'* Constants defining specific column widths
'*******************************************************************
Const strSymbol As Single = 2.42316
Const strUnits As Single = 0.9398
Const strNote As Single = 1.44526
Sub subButton()
Dim strFolder As String
Dim strStrtCell As String
Dim strNameAdd As String
Dim strFileName As String
Dim strMsg As String
Dim strMsgBox As String
strFolder = Application.InputBox("Please enter internet path for the saving" & _
"of the generated files", "Output File Location", "\\Please enter desired" & _
"output path")
If strFolder = "False" Then
End
End If
strMsg = "Please enter start Column " + vbCrLf + "i.e. the Column that" & _
"contains the name:"
strMsg = strMsg + vbCrLf + "e.g. Component, UDIMM, RDIMM etc. "
strStrtCell = Application.InputBox(strMsg, "Column", "A")
'strStrtCell = "AO"
'strStrtCell = "D"
If strStrtCell = "False" Then
End
End If
strFileName = Range(strStrtCell + "1").Offset(0, 1).Value
strNameAdd = strFolder + "\" + strFileName + ".xml"
'strNameAdd = "\\Dateien\Mein_Ordner\XML" + "\" + strFileName + ".xml"
strMsgBox = MsgBox(strNameAdd, vbOKCancel, "Filepath")
If strMsgBox = vbCancel Then
End
End If
subXMLFileBegin strStrtCell, strNameAdd
End Sub
Sub subXMLFileBegin(ByVal strStrtCell As String, ByVal strFileName As String)
Dim myStrVar As String
Dim strMsg As String
Dim strTCaption As String
Dim i As Integer
Dim intCols As Integer
Const intTableHRowBegin As Integer = 5
Const intTableHColBegin As Integer = 0
Const intLabel As Integer = 1
i = intTableHRowBegin
intCols = intTableHColBegin
Range(strStrtCell + "1").Offset(intLabel, 0).Select
If Range(strStrtCell + "1").Offset(intLabel, 0).Value = "Component" Then
i = 8
End If
Range(strStrtCell + "1").Offset(i, 0).Select
While Range(strStrtCell + "1").Offset(i, intCols).Value <> "End"
Range(strStrtCell + "1").Offset(i, intCols).Select
intCols = intCols + 1
Wend
'MsgBox intCols
'cnth.endDocument
xml.loadXML ""
'dim xml as New MSXML2.
'xml.loadXML "<?xml version=""1.0"" encoding=""UTF-8""?><!DOCTYPE" & _
"Document SYSTEM ""file:///C:/FM7_XML/Tools/dtd/dtd_3.0b.dtd"">"
'xml.loadXML "<!DOCTYPE Document SYSTEM" & _
"""file:///C:/FM7_XML/Tools/dtd/dtd_3.0b.dtd"">"
Set xmlProcInstr = xml.createProcessingInstruction("xml", "version=""1.0""" & _
"encoding=""UTF-8""")
xml.appendChild xmlProcInstr
Set xmlComment = xml.createComment("exporting of Idd tables to xml")
xml.appendChild xmlComment |