smashclash
Board Regular
- Joined
- Nov 24, 2003
- Messages
- 126
- Office Version
- 365
- Platform
- Windows
I have a macro that performs tasks for a sheet. (Call it macro "X" for reference.) I have another macro (reference name Macro "Y") that runs macro "X" for every excel workbook that is open. I set this up in another workbook but want to transfer into my personal macro's file.
I copied everything into my file but when I try to run macro Y it gets an error because it can't find macro X. How do I tell Macro Y where to find macro X?
This is what the macro looked like before I moved the data:
Sub HideALL()
For Each wb In Workbooks
If wb.Name <> ThisWorkbook.Name Then
Windows(wb.Name).Activate ' new line - activate the wb first
Application.Run ("VeryHidden.xls!Hideone")
End If
Next wb
End Sub
I copied everything into my file but when I try to run macro Y it gets an error because it can't find macro X. How do I tell Macro Y where to find macro X?
This is what the macro looked like before I moved the data:
Sub HideALL()
For Each wb In Workbooks
If wb.Name <> ThisWorkbook.Name Then
Windows(wb.Name).Activate ' new line - activate the wb first
Application.Run ("VeryHidden.xls!Hideone")
End If
Next wb
End Sub