Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Execute code in a loop - Question
Hello all, i am not a programmer so forgive the type of questions. Is it
possible to run code to manipulate a document if it is opened within a loop and once finished the loop continues ? -- Les |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Execute code in a loop - Question
Hi Les, yes it is:
sub demo() dim wb as work book dim s as string dim i as integer s= "C:\Filepath\File.xls" for i = 1 to 10 Set wb = Workbooks.Open(s, False) 'Write your code in here wb.Close next i end sub "Les" wrote: Hello all, i am not a programmer so forgive the type of questions. Is it possible to run code to manipulate a document if it is opened within a loop and once finished the loop continues ? -- Les |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Execute code in a loop - Question
Thanks Sam, much appreciated
-- Les "Sam Wilson" wrote: Hi Les, yes it is: sub demo() dim wb as work book dim s as string dim i as integer s= "C:\Filepath\File.xls" for i = 1 to 10 Set wb = Workbooks.Open(s, False) 'Write your code in here wb.Close next i end sub "Les" wrote: Hello all, i am not a programmer so forgive the type of questions. Is it possible to run code to manipulate a document if it is opened within a loop and once finished the loop continues ? -- Les |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop works correctly but takes extremely long to execute | Excel Programming | |||
Execute code from book1 of code from book2 | Excel Programming | |||
Trying to execute function after negative if conditional nested in For each loop | Excel Programming | |||
Execute Code | Excel Programming | |||
ADO command.execute with a loop - only runs once | Excel Programming |