Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro repeat decimal Excel Worksheet Functions 2 May 21st 09 11:53 PM
Repeat a Macro Victoria[_3_] Excel Worksheet Functions 1 September 25th 07 07:11 PM
How to get a macro to repeat \\sh Excel Discussion (Misc queries) 2 November 6th 06 05:04 PM
Repeat Macro tvkodde26 Excel Worksheet Functions 5 October 19th 05 07:37 PM
Getting a macro to repeat Hru48 Excel Discussion (Misc queries) 2 August 18th 05 07:27 PM


All times are GMT +1. The time now is 07:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"