Home
About
Examples
Setup/Info
Ribbon
Mail/PDF
Files/Folders
Worksheets
Userforms
Pictures/Charts
Excel Settings
Other Topics
Add-Ins
Articles
Search
Contact
Mac Excel Automation
Home
About
Examples
Setup/Info
Ribbon
Mail/PDF
Files/Folders
Worksheets
Userforms
Pictures/Charts
Excel Settings
Other Topics
Add-Ins
Articles
Search
Contact
Home
About
Examples
Setup/Info
Ribbon
Mail/PDF
Files/Folders
Worksheets
Userforms
Pictures/Charts
Excel Settings
Other Topics
Add-Ins
Articles
Search
Contact
__
Check if File is open on Mac
If you want to know if a certain file is open you can use the custom function named
bIsBookOpen
in your project and call this function in your macro, see the macro example and the function below.
Sub CheckIfFileIsOpen() Dim Fname As String Fname = "TheNameOfYourExcelFile.xlsx" If bIsBookOpen(Fname) = False Then MsgBox "The file " & Fname & " Is not open" Else MsgBox "The file " & Fname & " Is open" End If End Sub Function bIsBookOpen(ByRef szBookName As String) As Boolean ' Rob Bovey On Error Resume Next bIsBookOpen = Not (Application.Workbooks(szBookName) Is Nothing) End Function