'查找驱动器
Sub Command1_Click()
Dim FS, D
Dim i As Integer
'On Error Resume Next
Set FS = CreateObject("Scripting.FileSystemObject")
For i = 97 To 122 '(a 到 z)
DoEvents
If FS.DriveExists(Chr(i)) Then '驱动器存在
Set D = FS.getdrive(Chr(i))
If D.isready Then '驱动器就绪
Form1.Combo1.AddItem UCase(Chr(i) & ";/")
End If
End If
Next i
End Sub
Sub Command1_Click()
Dim FS, D
Dim i As Integer
'On Error Resume Next
Set FS = CreateObject("Scripting.FileSystemObject")
For i = 97 To 122 '(a 到 z)
DoEvents
If FS.DriveExists(Chr(i)) Then '驱动器存在
Set D = FS.getdrive(Chr(i))
If D.isready Then '驱动器就绪
Form1.Combo1.AddItem UCase(Chr(i) & ";/")
End If
End If
Next i
End Sub
[本日志由 田草 于 2008-06-27 11:05 AM 编辑]
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |