VBA 搜索共享资源
来源:互联网 发布:剑三成男天策捏脸数据 编辑:程序博客网 时间:2024/06/06 02:58
'添加引用 Windows Script Host Object Model
Sub SearchShared()
Dim a As WshNetwork
Dim oPrinter As WshCollection
Set a = New WshNetwork
Set oPrinter = a.EnumPrinterConnections
Debug.Print "Network printer mappings:"
For i = 0 To oPrinter.Count - 1 Step 2
Debug.Print "Port" & oPrinter.Item(i) & oPrinter.Item(i + 1)
Next
Dim colDrives As WshCollection
Set colDrives = a.EnumNetworkDrives
If colDrives.Count = 0 Then
MsgBox "no drive"
Else
MsgBox colDrives.Count
strmsg = "当前网络驱动器连接:" & crlf
For i = 0 To colDrives.Count - 1 Step 1
Debug.Print colDrives(i)
Next
End If
End Sub
- VBA 搜索共享资源
- 共享资源
- 共享资源
- 共享资源
- 无法访问共享资源
- 多线程共享资源
- 多线程共享资源
- vba
- vba
- vba
- vba
- VBA
- vba
- VBA
- VBA
- VBA
- VBA
- VBA
- C #中的几个线程同步对象方法二
- 用AnimateWindow函数实现窗口动画效果
- 用户日志生成策略,哪个方案好?
- Terminal too wide (solaris vi editor)
- ASP.NET生成静态页面
- VBA 搜索共享资源
- 使用视图和存储过程的优缺点
- Can not write to cache files, please check directory ./data/ and ./data/cache/ . 的解决方法
- N-Gram 算法用来做相似度比较
- Linux进程状态解析
- Android的MediaRecorder架构介绍
- 一个相对好的 原码下载网站
- 为什么是List list = new ArrayList()
- 充分利用 Oracle SQL Developer 报表