From: RyanH on
Just cut and paste your code where I indicated below. I hope this help! If
so, let me know, click "YES" below.

Sub RunMacro()

Dim TimesRan As Long

Do Until TimesRan = 15

' put your code here

TimesRan = TimesRan + 1

Loop

End Sub

"Brad" wrote:

> I have Excel 2002 and routinely use the macro recorder. I can read the
> macros and make simple edits, but never learned to program in VB and my
> fortran programming experience is from 30 years ago. After recording a
> macro, I want it to loop 15 times before exiting. What lines to I need to
> add to the code to start and end the loop? I already have the macro. It
> basically inserts a line, totals certain columns and formats one cell.
>
> Brad
>
> .
>
From: Brad on
Worked great. Thanks everyone!

Brad

"Brad" <bwyarger(a)hotmail.com> wrote in message
news:OfuM5OajKHA.2260(a)TK2MSFTNGP04.phx.gbl...
>I have Excel 2002 and routinely use the macro recorder. I can read the
>macros and make simple edits, but never learned to program in VB and my
>fortran programming experience is from 30 years ago. After recording a
>macro, I want it to loop 15 times before exiting. What lines to I need to
>add to the code to start and end the loop? I already have the macro. It
>basically inserts a line, totals certain columns and formats one cell.
>
> Brad