Private Sub PrintOutput(ByVal strData As String)
Dim strPath As String
Dim strExcel As String
Dim strFileName As String
' saving the xml file
strExcel = Trim(lblFileName.Caption)
strExcel = Mid(strExcel, 1, InStr(1, strExcel, ".") - 1)
strFileName = "MerchantNo" & Trim(MDIMain.lblMerchantID.Caption) & strExcel & ".xml"
strPath = App.Path & "\XML\" & strFileName
Dim OutFile As Integer
On Error GoTo SErr:
Dim strTest As String
OutFile = FreeFile
Open strPath For Output As #OutFile
Print #OutFile, strData
Close #OutFile
MsgBox "XML Saved", vbOKOnly
'#############################################################
Exit Sub
SErr:
MsgBox Err.Description
End Sub
No comments:
Post a Comment