14/11/06 18:27
Private Sub btnapri_Click() ultimospazio = False Path = "" On Error GoTo fine Path = txtfile.Text txtfile.Text = "" Open Path For Input As #1 Do Line Input #1, Linea File = File & Linea Loop Until EOF(1) = True Close #1 Path = "" Text1.Text = File Exit Sub fine: Close #1 MsgBox Err.Description End Sub
la versione col mid è grezza cioè non è pronta ma si tratta +o- di questo
Private Sub btnapri_Click() ultimospazio = False Path = "" On Error GoTo fine Path = txtfile.Text txtfile.Text = "" Open Path For Input As #1 Do Line Input #1, Linea File = File & Linea Loop Until EOF(1) = True Close #1 Path = "" Text1.Text = File [b]For X = 1 To Len(File) If Mid(File, X, 3) = "C:\" Then For K = X To Len(File) If Mid(File, K, 1) = "." Then ultimospazio = True Path = Path & Mid(File, K, 1) Else If ultimospazio = True Then If Mid(File, K, 1) = " " Then txtfile.Text = Path GoTo theend End If End If Path = Path & Mid(File, K, 1) End If Next K End If Next X theend:[/b] Exit Sub fine: Close #1 MsgBox Err.Description End Sub
Ultima modifica effettuata da 14/11/06 21:35