This code works on USA computers:
It produces a "Runtime error 5" in line number 60 on Asian computers with the language set to Chinese, probably due to the double-byte characters that somehow get into MyData. StartRead is 0.Code:Dim MyData As String, StartRead As Long, EndRead as Long 10 Open AppPath & "Stems" For Binary As #1 20 MyData = Space$(LOF(1)) 30 Get #1, , MyData 40 Close #1 50 StartRead = InStr(MyData, "Hello") 60 EndRead = InStr(StartRead, MyData, ".")
(1) How can I adjust the code so that it will work on both machines?
(2) How can I change the settings on my XP machine so that I can emulate the Chinese computers to help me debug this code?




Reply With Quote