I have a VBA project in excel which hides the workbook in the background and only shows the userform, it works fine however, causes problems when other workbooks are open as it
I think, since 'ActiveWorkbook' can also be empty, the safest answer for VBA may be:
Option Explicit
Public Function IsAnyWorkbookOpen() As Boolean
IsAnyWorkbookOpen = (Application.Workbooks.Count > 0)
End Function
Sub test()
MsgBox ("IsAnyWorkbookOpen returns: " + CStr(IsAnyWorkbookOpen()))
End Sub