ConradBartimus
New Member
- Joined
- Sep 19, 2015
- Messages
- 24
I am Stupid haha.
Please help me, I have two auto refreshing workbooks. Both workbooks are running smooth (approximately every 5 minutes). I have changed the Auto Refreshes to call a macro within the current work book(in both work books), the macro being called "should" call the macro in the other workbook and then activate the auto refresh. This in turn "should" call the original macro and create an infinite loop.
Here are the four macros:
Book1- (AnotherBrookInTheWall)
Sub All()
Call LRB
Call LoadBalance
Call Promise
Call RunRisk
Application.OnTime Now + TimeValue("00:02:15"), "PG"
End Sub
Sub PG()
Workbooks("PgOneStop").Activate
Workbooks("PgOneStop").Application.Run ("!Auto")
End Sub
Book2- (PgOneStop)
Sub Auto()
Call All
Application.OnTime Now + TimeValue("00:02:00"), "Brook"
End Sub
Sub Brook()
Workbooks("AnotherBrookOnTheWall").Activate
Workbooks("AnotherBrookOnTheWall").Application.Run ("!All")
End Sub
The Error I am getting is:
"Run-time error '1004':
"Cannon run the macro '!Auto'. The macro may not be available in this workbook or all macros may be disabled."
Does anyone know what is causing this.
Please help me, I have two auto refreshing workbooks. Both workbooks are running smooth (approximately every 5 minutes). I have changed the Auto Refreshes to call a macro within the current work book(in both work books), the macro being called "should" call the macro in the other workbook and then activate the auto refresh. This in turn "should" call the original macro and create an infinite loop.
Here are the four macros:
Book1- (AnotherBrookInTheWall)
Sub All()
Call LRB
Call LoadBalance
Call Promise
Call RunRisk
Application.OnTime Now + TimeValue("00:02:15"), "PG"
End Sub
Sub PG()
Workbooks("PgOneStop").Activate
Workbooks("PgOneStop").Application.Run ("!Auto")
End Sub
Book2- (PgOneStop)
Sub Auto()
Call All
Application.OnTime Now + TimeValue("00:02:00"), "Brook"
End Sub
Sub Brook()
Workbooks("AnotherBrookOnTheWall").Activate
Workbooks("AnotherBrookOnTheWall").Application.Run ("!All")
End Sub
The Error I am getting is:
"Run-time error '1004':
"Cannon run the macro '!Auto'. The macro may not be available in this workbook or all macros may be disabled."
Does anyone know what is causing this.