标准代码:Try Dim aa As New System.IO.FileStream("c:\book1.xls", IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.None) aa.Dispose() messagebox.show("没有人打开")Catch ex As Exception messagebox.show("有人打开")End Try
收藏,慢慢研究!