Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
remembering the nth item in one sub routine in the next sub routin
I have a macro which has one sub routine running another sub routine, however
I want the n number I defined in the first sub routine to be rembered in the next sub routine. ie Dim Asset(1 To 19) As String 'Camilla EDITED coding Asset(1) = "Eurostoxx 50" Asset(2) = "Nasdaq 100" Dim n As Integer For n = 1 To 19 Worksheets(Asset(n)).Activate CloseDay MyDay, MyMonth, MyYear Next n then in the next sub routine I am trying to switch between workbooks and worksheets ie Workbooks("Trade Files").Worksheets(Asset(n)).Activate but I need it to remember the the (Asset(n)) from the previous sub routine. Can anyone help? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Remembering lookups | Excel Worksheet Functions | |||
Remembering a value moving from one sheet to another | Excel Discussion (Misc queries) | |||
Remembering Data Values. | New Users to Excel | |||
For and If Then loops, and remembering a value | Excel Programming | |||
UserForm remembering Settings | Excel Programming |