假如只是想列驱动器名,如下很简单的,网络驱动器映射后也一样能列出。
‘列出所有驱动器,不含A,B
Dim drv() As String
Dim sd As String
drv() = Split("C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z", ",")
For i = 0 To 23
sd = drv(i) & ":\"
If Dir(sd, vbDirectory) <> "" Then
comb.AddItem sd ’添加到列表中
End If
Next
温馨提示:内容为网友见解,仅供参考