判斷磁碟機是否存在 DriveExists Method


Function ReportDriveStatus(drv) Dim fso, msg Set fso = CreateObject("Scripting.FileSystemObject") If fso.DriveExists(drv) Then msg = ("Drive " & UCase(drv) & " exists.") Else msg = ("Drive " & UCase(drv) & " doesn't exist.") End If ReportDriveStatus = msgEnd Function
https://msdn.microsoft.com/en-us/library/t565x0f1(v=vs.84).aspx https://social.msdn.microsoft.com/Forums/vstudio/en-US/dc854317-1a72-4f35-9112-91567b5a08e0/how-to-check-if-a-drive-exists-using-vb2010?forum=vbgeneral



留言

熱門文章