Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sub CheckIfFileOpen()
Dim fileName As String
fileName = "C:\Users\marks\Documents\......." 'Tên file kèm đường dẫn
'Gọi function kiểm tra file đóng hay mở
If IsFileOpen(fileName) = False Then
'Câu lệnh thực hiện khi file đang đóng
'File đang mở hoặc lỗi khác
MsgBox fileName & " is already open."
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.