Ho scritto il seguente codice:
Dim Dest, Dir As String
Private Sub Command1_Click()
Dim res As String
Form1.Dir1.Path = Form1.Drive1.Drive
Form1.File1.Path = Form1.Dir1.Path
Dir = Form1.File1.Path & "\" & Form1.File1.filename
res = MsgBox("Copiare il file " & Dir & " in " & Dest & " ?", vbQuestion + vbYesNo, "Conferma")
If res = vbYes Then
FileCopy Dir, Dest
MsgBox "File copiato!", vbInformation, "Informazione"
Unload Form2
End If
End Sub
Private Sub Command2_Click()
Unload Form2
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
Dest = File1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Che mi serve per copiare un file, la cui path è specificata nel form1, nella destinzione specificata nel form2. Il problema è che quando gira, e arriva a FileCopy Dir,Dest VB mi manda un messaggio con "Run-time error 75: Path/File access error". Cosa significa?