我有兩個巨集 程式都滿長的
所以會用呼叫另外一個巨集的方式進行處理
想要讓reserve_table_Calculation 直接在vba的地方 將output_RBC 所產生的rbc(m) 直接讀入rbc1((k - 1) * MO + M, 1) 裡面?
Sub reserve_table_Calculation()
....
Worksheets("Input").Range("C4") = 15 + I * 20
Worksheets("Input").Range("C5") = j
..
'' Produce reserve_result & rbc_result
For k = 1 To b Step 1 'scenario
Worksheets("Month_P").Range("CL18") = k
Call RBC_Main
Application.Calculation = xlCalculationAutomatic
Application.Calculation = xlCalculationManual
For M = 1 To MO Step 1
' rbc1((k - 1) * MO + M, 1) = ???color]
Next M
Next k
End Sub
Sub output_RBC()
Worksheets("Month_P_RV").Select
Range("ref_AG37").Select
For m = 1 To mo
ActiveCell.Offset(T - 1, 2).Value = RBC(m)
Next T