There is a compile error in the code you have posted for Function WorkbookIsOpen.
Code:
Set wb = xlApp.Workbooks(filePath) ' Try to get the workbook
the variable xlApp does not exist in this scope.
In your new variable declarations
Code:
Dim chartObj As Excel.chartObject
should be
Code:
Dim chartObj As Excel.Chart