Passing an argument to a quote

  • Thread starter Thread starter Zach
  • Start date Start date
Z

Zach

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
 
Of course that line goes inside a

For i = 1 to 140
Workbooks.Open ......

Next i

loop.
 
Back
Top