Running a Macro a number of times

J

JWF

Hi
Jane from Portbury, nr Bristol (England) again
I have Office 2000 and XP
I don't know how to edit macros, VB language is a little too much for me -
but I can create them, use them and enjoy them.
I do lots of editing and often need to repeat keystrokes over and over
again, but once the file is finished never use the macro again so I tend to
save a macro to the keyboard, call it temp and run it using 2 keystrokes the
number of times I want the macro to run.
What I would like to be able to do is to run a macro say 5 times or 15 times
without hitting the 2 keystrokes the number of times required.
Hope this makes sense. I need this to work in Word as well.

Thanks
xJane
 
G

Gary''s Student

Sub hello()
MsgBox ("hello")
End Sub


Sub times_three()
For i = 1 To 3
Call hello
Next
End Sub

times_three calls hello three times
 
Top