Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passing an argument to a quote
Hi,
I have 140 (a1-a140) spreadsheets on which i am interested in performing a particular task. I wrote a code to perform that task on a single spreadsheet. Example below: Workbooks.Open Filename:= _ "M:\My Documents\a1.xls" Sheets("Board - General").Select Rows("1:1").Select Selection.Delete Shift:=xlUp I now would like to incorporate the above code into a For next loop For i = Startval To EndVal My question is how do i rename the spreadsheet in "M:\My Documents\a1.xls" so it will take the values a1-a140 using the i counter. (Startval will be 1 and endval will be 140). Thanks for your help, Zach |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passing an argument to a quote
Of course that line goes inside a
For i = 1 to 140 Workbooks.Open ...... Next i loop. On Thu, 24 Jul 2003 19:33:56 -0700, "Ryan Poth" wrote: Try: Workbooks.Open Filename:= "M:\My Documents\a" & format (i,"#")) & ".xls" -----Original Message----- Hi, I have 140 (a1-a140) spreadsheets on which i am interested in performing a particular task. I wrote a code to perform that task on a single spreadsheet. Example below: Workbooks.Open Filename:= _ "M:\My Documents\a1.xls" Sheets("Board - General").Select Rows("1:1").Select Selection.Delete Shift:=xlUp I now would like to incorporate the above code into a For next loop For i = Startval To EndVal My question is how do i rename the spreadsheet in "M:\My Documents\a1.xls" so it will take the values a1-a140 using the i counter. (Startval will be 1 and endval will be 140). Thanks for your help, Zach . |
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 an argument to a quote | Excel Programming |