Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Is it possible to pass an argument to another procedure without calling the procedure? In my worksheet i have two procedures. One manipulates the range, the other gives the user an option to undo the resluts of the first procedure. Here's the code that im using now. It works well, but requires me to keep extra blank worksheet to save the range to: Sub CommandButton1_Click () Dim StoredValue(1 To 17) As Long For i = 1 To 17 StoredValue(i) = Sheets("Schedule of Values").Cells(i+13, 3).Value Next i For i = i To 17 Sheets("Temp").Cells(i, 3).Value = StoredValue(i) Next i [Instructions] End Sub Sub CommandButton2_Click () Dim TempValues(1 To 17) As Long For i = 1 To 17 TempValues(i) = Sheets("Temp").Cells(i, 3).Value Next i For i = 1 To 17 Sheets("Schedule of Values").Cells(i+13, 3).Value = TempValues(i) Next i End Sub There's gotta be a way to pass the first array to the second button-triggered sub! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing a UDF as an argument to a UDF | Excel Discussion (Misc queries) | |||
?Passing argument/parameter | Excel Programming | |||
VBA - Passing a FUNCTION as an Argument | Excel Programming | |||
Passing range as argument | Excel Programming | |||
Passing an argument to a quote | Excel Programming |