O
Otto Moehrbach
Excel XP & Win XP
I have a WB, say BBB.xls.
It has a macro, say MyMacro.
MyMacro uses the variable TheRow.
The code in BBB.xls calculates the value of TheRow and calls MyMacro.
Let's say the last value of TheRow was 20.
All works great.
I have another WB, say AAA.xls.
The code in AAA.xls calculates the value of TheRow as, say 15, and calls
MyMacro in BBB.xls with:
Application.Run.....................
MyMacro runs.
The problem: MyMacro uses 20 as the value of TheRow, not 15.
My question: How can I pass the new value of TheRow in the MyMacro call?
Possible solution is to write a macro in BBB.xls that gets TheRow from
AAA.xls and then calls MyMacro, and then have AAA.xls call that new macro
instead of MyMacro. This sounds good except for the fact that the file name
of the AAA.xls file is a variable. That muddies the water.
Thanks for your time. Otto
I have a WB, say BBB.xls.
It has a macro, say MyMacro.
MyMacro uses the variable TheRow.
The code in BBB.xls calculates the value of TheRow and calls MyMacro.
Let's say the last value of TheRow was 20.
All works great.
I have another WB, say AAA.xls.
The code in AAA.xls calculates the value of TheRow as, say 15, and calls
MyMacro in BBB.xls with:
Application.Run.....................
MyMacro runs.
The problem: MyMacro uses 20 as the value of TheRow, not 15.
My question: How can I pass the new value of TheRow in the MyMacro call?
Possible solution is to write a macro in BBB.xls that gets TheRow from
AAA.xls and then calls MyMacro, and then have AAA.xls call that new macro
instead of MyMacro. This sounds good except for the fact that the file name
of the AAA.xls file is a variable. That muddies the water.
Thanks for your time. Otto