Hi Cor,
Thanks for the reply.
Here are some of the codes which might be causing the problem.
Private Sub Button_start_Cl ick(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button_start.Cl ick
Dim filename, filename2 As String
Dim file1, file2 As String
Dim startcheck As Boolean
startcheck = False
totError = 0
filename = TextBox_file1.T ext
filename2 = TextBox_file2.T ext
file1name = extractFilename (filename)
file2name = extractFilename (filename2)
If selectType = 1 Then
saveFilename = UDFolder + "\" + file1name + "_NCZvsNCZ. rep"
startcheck = startError()
If startcheck Then
'Header
FileSystem.Prin tLine(1,
"************** *************** *************** ****")
FileSystem.Prin tLine(1, " NCZ vs NCZ Comparison")
FileSystem.Prin tLine(1, " " + file1name + ".NCZ vs " +
file2name + ".NCZ Comparison")
FileSystem.Prin tLine(1, " " & Date.Now.ToStri ng())
FileSystem.Prin tLine(1,
"************** *************** *************** ****")
FileSystem.Prin tLine(1, "")
FileSystem.Prin tLine(1, "")
'Open and Sort file
Try
OpenSortNCZ(fil ename, 1)
OpenSortNCZ(fil ename2, 2)
Catch
MsgBox("Critica l Error during opening file!",
MsgBoxStyle.Cri tical)
End
End Try
'Checking both file
Try
checkNCZVsNCZ()
Catch
MsgBox("Critica l Error during checking file!",
MsgBoxStyle.Cri tical)
End
End Try
End If
............
End Sub
Public Function extractFilename (ByVal filename As String) As String
Dim strFullPathToFi leName As String
Dim strPath As String
Dim strFileName As String
Dim backslashPos As Integer
'delete away \ path
strFullPathToFi leName = filename
backslashPos = InStrRev(strFul lPathToFileName , "\")
If backslashPos > 0 Then
strPath = Microsoft.Visua lBasic.Left(str FullPathToFileN ame,
backslashPos)
strFileName = Mid(strFullPath ToFileName, backslashPos + 1)
Else
strPath = ""
strFileName = strFullPathToFi leName
End If
'delete away ext
strFileName = Microsoft.Visua lBasic.Left(str FileName,
InStrRev(strFil eName, ".") - 1)
'MsgBox(strFile Name)
Return strFileName
End Function
Hope this helps.....
"Cor Ligthert" wrote:
Wong,
The only thing I can come up from this information and because of the
different versions, (I don't know if that is for language types), that it
can be that the computers have different country settings and that you have
hard coded stringsformat which you use as filenames.
However can maybe show the code where that io operation is done where it
crashes?
Cor