Hello,
I have been coding excel for a while and I have a utilities file workbook with a big group of functions and procedures I use often in my projects. Right now every time I need to use of my tool sets I would import it to my project and I would run it normally from there using "Call or Application.run"
But I am trying to create a way where I would have all my utilities always updated and also have the flexibility of having them exposed in the code. It would be a little awkward to have a construction like bellow in my code:
Sub Sample()
If Application.Run("Utilities.xlsm!U_W_IsWorkbookOpen", "Myworkbok.xlsx") Then
Debug.Print "The workbook is open"
Else
Debug.Print "The workbook is not open"
End If
End Sub
and a better more readable construction would be:
Sub Better()
If U_W_IsWorkbookOpen("Myworkbok.xlsx") Then
Debug.Print "The workbook is open"
Else
Debug.Print "The workbook is not open"
End If
End Sub
In order to make the latest to work I would have to add the reference to the workbook that would be using the framework procedure. Which of course will be accompanied with the headaches of adding a reference to all your Workbooks.
Have you done anything like this before? Any ideas?
Thanks