Hi,
I have this line,
Sheets("MC1A.txt").Select
Application.Run "'compression test 2-21-05.xls'!Force_Comp_chart"
ActiveWindow.Visible = False
Windows("compression test 2-21-05.xls").Activate
Sheets("MC1B.txt").Select
Application.Run "'compression test 2-21-05.xls'!Force_Comp_chart"
ActiveWindow.Visible = False
Windows("compression test 2-21-05.xls").Activate
How do I replace the "MC1A.txt and MC1B" with a variable that call to a all the worksheet number that work same way without having to repeat the 4lines and the specific name (MC1B.txt ect..).
I try changing
Sheets("MC1A.txt").Select
with sheet(Array("sheet1","sheet2").Select
but its not working
Any help or suggestion is greatly appreciated!
I have this line,
Sheets("MC1A.txt").Select
Application.Run "'compression test 2-21-05.xls'!Force_Comp_chart"
ActiveWindow.Visible = False
Windows("compression test 2-21-05.xls").Activate
Sheets("MC1B.txt").Select
Application.Run "'compression test 2-21-05.xls'!Force_Comp_chart"
ActiveWindow.Visible = False
Windows("compression test 2-21-05.xls").Activate
How do I replace the "MC1A.txt and MC1B" with a variable that call to a all the worksheet number that work same way without having to repeat the 4lines and the specific name (MC1B.txt ect..).
I try changing
Sheets("MC1A.txt").Select
with sheet(Array("sheet1","sheet2").Select
but its not working
Any help or suggestion is greatly appreciated!