Repeat run of macro
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Repeat run of macro

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Philippines
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Have a macro which runs 3 submacros. What do I use to have this macro repeat itself a specified number of times?
    Here's the macro:
    Sub Extract1()
    '
    ' Extract1 Macro
    ' Macro recorded 4/5/2002 by Hans
    '

    '
    Application.Run "'Address Retriever2.xls'!Extract"
    Application.Run "'Address Retriever2.xls'!SelectRange1"
    Application.Run "'Address Retriever2.xls'!Distribute"
    End Sub

    Hans

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    =ActiveCell.Address
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


    Simply put it in a loop of some sort.
    For example, place

    For i = 1 to 3

    At the top of the macro

    And

    Next i

    At the bottom and it will do everything 3 times.

    Rgsd
    AJ


  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Philippines
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Thanks AJ,
    Soon I'm gonna know it all
    Hans

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com