Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I repeat a macro?
I have a check list with the name of some hundred documents. I want to open
them by turns, to copy date from these documents and to inscribe them in a centralizer document. I wrote the macro for one running but I want to repeat an automaton for all documents. I don't want the prompt messages for each run. How can I do this? Thanks for any helps Emil |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I repeat a macro?
As ALWAYS, post your coding efforts for comments and suggestions.
-- Don Guillett SalesAid Software "emil" wrote in message ... I have a check list with the name of some hundred documents. I want to open them by turns, to copy date from these documents and to inscribe them in a centralizer document. I wrote the macro for one running but I want to repeat an automaton for all documents. I don't want the prompt messages for each run. How can I do this? Thanks for any helps Emil |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I repeat a macro?
You can write two macros (routines) something like this:
Sub Macro1() Workbooks.Open Filename:="pathname\filename.extension" Call Macro2() ' Repeat for each filename you want to open ' Alternatively you can write a filesearch routine that looks/opens files with certain path/filename criteria... End Sub Sub Macro2() Range("CopyRange").Select Selection.Copy Windows("CentralizerDocumentName.extension").Activ ate Sheets("SheetNameifExcel").Select ' May want to use if statement here for pasting in a certain location Range("PasteRange").Select Selection.Paste ' or some variant paste End Sub Hope this helps. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro repeat | Excel Worksheet Functions | |||
Repeat a Macro | Excel Worksheet Functions | |||
How to get a macro to repeat | Excel Discussion (Misc queries) | |||
Repeat Macro | Excel Worksheet Functions | |||
Getting a macro to repeat | Excel Discussion (Misc queries) |