hi,
I am trying to make conversion program.
This is what I have so far.
1. I can convert one file
2. I can select more than one file.
3. but, when I convert more than one file, error occurs.
I do not know how to convert mutiple files.
Would you please help me??
========================================
Private Sub Convert_Click()
Dim i As Integer
Dim FileName As String
Dim sFile() As String
On Error Resume Next
CommonDialog1.Filter = "Web Files|*.htm;*.html"
'CommonDialog1.Flags = cdlOFNAllowMultiselect + cdlOFNExplorer
CommonDialog1.Flags = cdlOFNHideReadOnly Or cdlOFNPathMustExist Or cdlOFNAllowMultiselect Or cdlOFNExplorer
CommonDialog1.FileName = vbNullString
CommonDialog1.ShowOpen
FileName = CommonDialog1.FileName
'=======
If FileName <> "" Then
'Clear Rich Text content
RichTextBox1.Enabled = False
RichTextBox1.Text = vbNullString
'Convert - Modules
'===
Call ConvertFile(FileName) 'conversion part
'====
RichTextBox1.Enabled = True
RichTextBox1.Refresh
SmartMenuXP1.MenuItems.Enabled(3) = True
SmartMenuXP1.MenuItems.Enabled(11) = True
SmartMenuXP1.MenuItems.Enabled(13) = True
SmartMenuXP1.MenuItems.Enabled(14) = True
SmartMenuXP1.MenuItems.Enabled(15) = True
SaveButton.Enabled = True
'====
End If
'======
End Sub
I am trying to make conversion program.
This is what I have so far.
1. I can convert one file
2. I can select more than one file.
3. but, when I convert more than one file, error occurs.
I do not know how to convert mutiple files.
Would you please help me??
========================================
Private Sub Convert_Click()
Dim i As Integer
Dim FileName As String
Dim sFile() As String
On Error Resume Next
CommonDialog1.Filter = "Web Files|*.htm;*.html"
'CommonDialog1.Flags = cdlOFNAllowMultiselect + cdlOFNExplorer
CommonDialog1.Flags = cdlOFNHideReadOnly Or cdlOFNPathMustExist Or cdlOFNAllowMultiselect Or cdlOFNExplorer
CommonDialog1.FileName = vbNullString
CommonDialog1.ShowOpen
FileName = CommonDialog1.FileName
'=======
If FileName <> "" Then
'Clear Rich Text content
RichTextBox1.Enabled = False
RichTextBox1.Text = vbNullString
'Convert - Modules
'===
Call ConvertFile(FileName) 'conversion part
'====
RichTextBox1.Enabled = True
RichTextBox1.Refresh
SmartMenuXP1.MenuItems.Enabled(3) = True
SmartMenuXP1.MenuItems.Enabled(11) = True
SmartMenuXP1.MenuItems.Enabled(13) = True
SmartMenuXP1.MenuItems.Enabled(14) = True
SmartMenuXP1.MenuItems.Enabled(15) = True
SaveButton.Enabled = True
'====
End If
'======
End Sub