Se faccio Msgbox Command$, mi scrive effettivamente il nome del file, ma se lo tento di aprire: Runtime-error '52': bad file name or number.
eppure io uso una certa funzione txt che funziona sempre:
Codice PHP:
Public Function Opentxt(path As String) As String
Dim N As Integer
Dim strRead As String * 255
Dim i As Long
N = FreeFile
a = ""
Open path For Binary As #N Len = Len(strRead)
i = 1
Do While EOF(N) = False
Get #N, i, strRead
a = a & strRead
i = i + Len(strRead)
Loop
Close #N
Opentxt = a
' ESEMPIO XPText1.Text = Opentxt("c:\ciao.txt")
End Function
come mai non funzia? credo che centri con la variabile N, perchè il path ovviamente è giusto(è il contenuto della variabile command)