Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passing an argument to a quote
I have 140 spreadheets a1-a140.
I am interested in performing a task on each of them. I created a macro that performs the task on 1 spreadheet. I now would like to put this task in a For Next loop and be able to make the counter run between 1-140 Here is a snippet: For i = Startval To EndVal Workbooks.Open Filename:= _ "M:\My Documents\Projects\a1.xls" Rows("1:1").Select Selection.Delete Shift:=xlUp My question: what is the appropriate syntax to change a1.xls to a(i).xls so my spreadheet name will change automatically to a1-a140? Thanks for your help Zachh |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passing an argument to a quote
Zach,
Workbooks.Open Filename:= _ "M:\My Documents\Projects\a" & i & ".xls" HTH Henry "Zach" wrote in message om... I have 140 spreadheets a1-a140. I am interested in performing a task on each of them. I created a macro that performs the task on 1 spreadheet. I now would like to put this task in a For Next loop and be able to make the counter run between 1-140 Here is a snippet: For i = Startval To EndVal Workbooks.Open Filename:= _ "M:\My Documents\Projects\a1.xls" Rows("1:1").Select Selection.Delete Shift:=xlUp My question: what is the appropriate syntax to change a1.xls to a(i).xls so my spreadheet name will change automatically to a1-a140? Thanks for your help Zachh |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Passing a range name as an argument to the Index Function | Excel Discussion (Misc queries) | |||
formula for % passing | Excel Worksheet Functions | |||
Passing a row to a function | Excel Worksheet Functions | |||
Passing a UDF as an argument to a UDF | Excel Discussion (Misc queries) | |||
Passing Variables | Excel Discussion (Misc queries) |