Uso vba e uso il seguente codice per inteccettare la chiave usb.
il problema è che su non tutti i pc la lettera associata alla chiave è F:\...
come posso fare?
Grazie
Luisa
codice:
Private Declare Function GetLogicalDriveStrings Lib "kernel32" Alias _
"GetLogicalDriveStringsA" (ByVal nBufferLength As Long, ByVal lpBuffer As _
String) As Long
Private Sub Form_Load()
Dim S As String
S = String(255, Chr(0))
GetLogicalDriveStrings 255, S
D = Split(S, Chr(0))
For A = 0 To UBound(D)
If D(A) = "F:\" Then
MsgBox "TROVATA"
Exit For
Else
If D(A) <> "" Then
'MSgBox D(A) + " - " + Dir(D(A), vbVolume)
End If
End If
Next A
End Sub