You do quite a lot in that VBA just to find out if the file is open or not. I'm unsure about that LastUser function ... it doesn't seem to be called from anywhere. The file opened checking can be done through pure Lisp though:
Code:
(defun checkFile (path / file)
(if (setq path (findfile path))
(progn
(setq file (vl-catch-all-apply 'open (list path "w")))
(if (or (not file) (vl-catch-all-error-p file))
(alert (strcat path "\nFile is already open."))
(progn
(close file)
(alert (strcat path "\nFile is not open."))
) ;_ end of progn
) ;_ end of if
) ;_ end of progn
(alert (strcat path "\nFile is not found."))
) ;_ end of if
) ;_ end of defun
I'm sure that you can also read from the file to check for the last user through Lisp.