Программа перекодировки текста DOS (866 кодовая таблица) в Windows (1251). Код можно вставить в любую программу для просмотра текстового файла DOS в NotePad.

Private Sub mnuFileOpen_Click()
    '---------------------------------------------------
    'Открытие текстового файла DOS
    '(866 кодовой таблицы) из выбираемой директории
    'для просмотра в NotePad. Для случая с большим по
    'размеру файлом (например потенциальной базы данных)
    'системой выдается запрос на использование WordPad.
    '---------------------------------------------------
'Эти строки - в General основной формы
          Private Declare Function GetOEMCP Lib "kernel32" () As Long
          Private Declare Function GetACP Lib "kernel32" () As Long
          Private Declare Function OemToChar Lib "user32" Alias "OemToCharA" (ByVal lpszSrc As String, ByVal lpszDst As String) As Long
'-------------------------------------------------------
         Dim sFile As String
        Dim nShell As Integer
        On Error GoTo InputError
        With dlgCommonDialog
            'To Do
            'set the flags and attributes of the
            'common dialog control
            .Filter = "All Files (*.*)|*.*"
            .ShowOpen
             If Len(.filename) = 0 Then
                    Exit Sub
            End If
            sFile = .filename
        End With
        'To Do
        'process the opened file
        FilePath$ = dlgCommonDialog.filename
        Open FilePath$ For Input As 1
        InputStr$ = Input(LOF(1), 1)
        OutputStr$ = Space$(Len(InputStr$))
        Code& = OemToChar(InputStr$, OutputStr$)
        Close 1
        Open "c:/Program Files/Fuel/fueltemp.doc" For Output As 2
        Print #2, OutputStr$
        Close 2
        nShell = Shell("Notepad " & "c:Program FilesFuelfueltemp.doc", vbNormalFocus)
InputError:
        Exit Sub
End Sub