SpiderSpartan
New Member
- Joined
- Feb 13, 2009
- Messages
- 7
I have a master workbook with a macro that runs through each open workbook running a sub called TrendMacro(). For some reason I keep getting the error "The macro 'workbook2.xls!TrendMacro' cannot be found." The macro 'TrendMacro()' definitely exists in the module for workbook2. I thought maybe the workbook was protected or locked, but it's not. Anyone know why else this could be happening?
Thanks.
Here's the macro from the master workbook.
Here's the macro from workbook2
Here's the macro from the master workbook.
Code:
Sub TrendAll()
Dim Wkb As Workbook
ReDim ErrBooks(0 To 0)
For Each Wkb In Workbooks
Application.Run (Wkb.Name & "!TrendMacro")
Next Wkb
End Sub
Here's the macro from workbook2
Code:
Sub TrendMacro()
'This Sub is part of the 'TrendAll' macro.
MsgBox "DailyCellBBH Trending"
End Sub