Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
JWF
 
Posts: n/a
Default Running a Macro a number of times

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Running a Macro a number of times

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
--
Gary's Student


"JWF" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
JWF
 
Posts: n/a
Default Running a Macro a number of times

Sorry Gary, this may work but I don't know what to do with it.
xJane

"Gary''s Student" wrote:

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
--
Gary's Student


"JWF" wrote:

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

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
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
how to run a macro when a calculation equals a certin number Kevin Jones Excel Worksheet Functions 1 October 25th 05 09:40 PM
Counting the number of times someone called in sick smskater Excel Discussion (Misc queries) 3 September 16th 05 11:10 PM
getting a macro to run X amount of times.. Hru48 Excel Discussion (Misc queries) 2 August 19th 05 03:57 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 11:49 PM.

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

About Us

"It's about Microsoft Excel"