LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Hru48
 
Posts: n/a
Default getting a macro to run X amount of times..


Hey all,

I have a macro that I need to run the amount of time equal to the last
value in a list which will change in a monthly basis.

I tried to get it with a for loop but I don't know how to get it to run
a cetain amount of times, should I be using some kind of count and array
or is there a very simple way of doing this.

The macro is below if any one has any thoughts:




Sub tesIncrement20()



Range("D108:R108").Select
Selection.Copy
Windows("test").Activate
Sheets("cal").Select
Range("B1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Windows("North_central_agent.xls").Activate
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("Reference").Select
Windows("test").Activate


Range("A1").Select
Selection.Delete Shift:=xlUp
Selection.Copy
Windows("North_central_agent.xls").Activate
Range("H103").Select
ActiveSheet.Paste
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Summary").Select
Windows("test").Activate
Range("B1").Select
Application.CutCopyMode = False
Windows("North_central_agent.xls").Activate



End Sub


--
Hru48
------------------------------------------------------------------------
Hru48's Profile: http://www.excelforum.com/member.php...o&userid=24895
View this thread: http://www.excelforum.com/showthread...hreadid=397177

 
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
I need to find out how to multiply gross hours times amount of pay. Marc New Users to Excel 3 August 10th 05 03:38 AM
How do I set a macro to run at specific times? Nick123 Excel Discussion (Misc queries) 1 July 26th 05 06:19 PM
How do I find the amount of hours between times? gormanj Excel Discussion (Misc queries) 1 May 4th 05 12:26 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Can you limit the amount of times a calc is performed on certain cells n_davies Excel Discussion (Misc queries) 1 January 24th 05 10:43 PM


All times are GMT +1. The time now is 12:30 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"