1
ห้อง MS Access / USB DriveType มีค่าเป็น 2 (Fixed) ทำไมไม่เป็น 1 (Removable)
« เมื่อ: 22 เม.ย. 65 , 22:38:43 »
จากความตั้งใจ จะ copy ไฟล์ไปยัง USB อัตโนมัติตอนปิดโปรแกรม โดยปกติ USB ค่า DriveType=1 แต่เครื่องผมดันเป็น 2 (มองเป็นฮาร์ดดิสก์) มีวิธิแก้ไขมั๊ยครับ หรืออาจจะเช็คค่าอื่นแทน DriveType
Function getUSBDrive()
Set fso = CreateObject("Scripting.FileSystemObject")
For Each Drive In fso.Drives
If Drive.IsReady Then
MsgBox Drive.DriveLetter & " - " & Drive.VolumeName & " - " & Drive.DriveType
End If
Next
End Function
Function getUSBDrive()
Set fso = CreateObject("Scripting.FileSystemObject")
For Each Drive In fso.Drives
If Drive.IsReady Then
MsgBox Drive.DriveLetter & " - " & Drive.VolumeName & " - " & Drive.DriveType
End If
Next
End Function