After years of Excel programming, I suddenly feel stupid. I'm trying to access Public constants and a function in "My Macros.xlsm" (which is loaded every time I open Excel) from another workbook ("Expenses.xlsm").
[Expenses.xlsm:]
Sub UpdateTest()
ActiveWorkbook.SaveAs strMyDocs() & "FOO.xlsm"
End Sub
[My Macros.xlsm:]
Public Function strMyDocs() As String
strDefaultDir = LCase(MyDocuments)
End Function
I've simplified the code to make the problem easier to find. I get "Compile error: Sub or function not defined". "My Macros.xlsm" is loaded, the Module that holds strMyDocs isn't declared Private... and I'm lost. What obvious step am I missing?
Bookmarks