e nel modulo:
codice:Sub OpenFile(Filename As String) Dim F As Integer If "CodeWorld Editor - 1.0 : " + Filename = frmEditor.Caption Then Exit Sub Else On Error GoTo errhandler F = FreeFile Open Filename For Input As F frmEditor!txtEdit.Text = Input(LOF(F), F) Close F frmEditor.mnuFileItem(3).Enabled = True UpdateMenu frmEditor.Caption = "CodeWorld Editor - 1.0 : " + Filename Exit Sub End If errhandler: MsgBox "Si è verificato un errore durante l' apertura del file, si prega di riprovare.", 48, "Text Editor" Close F Exit Sub End Sub

Rispondi quotando