Hello, I am quite new to VBA but have come a long way in a short time.
I found it is very similar to Basic Programming I learnt at school. I am aslo new to the forum.
So now to my problem....
I have 22 Workbooks that Managers input Absence details into. A Master file links to the info. They all have sheets Monday to Friday. Each day after data input the Managers click a command button that sets that days sheet to 'complete' and locks it. At the end of the week an Admin runs a macro in the master file that opens all the books (one at a time), then the macro runs a macro in the managers workbooks that resets the sheets to 'incomplete and removes all the data they have inputed.
I need to know how I can detect if one of the managers has their wookbook open.
I know the code below works if the books are open with the same excel app (like when I test it on my PC),
Dim wBook As Workbook
On Error Resume Next
Set wBook = Workbooks("Personal.xls")
If wBook Is Nothing Then 'Not open
MsgBox "Workbook is not open"
Set wBook = Nothing
On Error GoTo 0
Else 'It is open
MsgBox "Yes it is open"
Set wBook = Nothing
On Error GoTo 0
End If
I need to know if one of the books are open over the network.
I hope I have explaimed this eough for some help :P
Bookmarks