Share via

vba subroutines process sequence

Anonymous
2013-02-02T12:36:29+00:00

Hello,

if I call two subs (one immediately after the other) from a standard sub, how does vba processes the two? Does it go through arrayLoader first and then continues to YearCombo or are they processed simultaneously? I was just trying to understand what "path" vba takes when multiple call operations are written in a sequence. Thanks

Private Sub Workbook_Open()

    Dim lngYear As Long, CurYear As Long

        CurYear = Year(Date)

        counter = CurYear - 2010 'Sets the nummber of years array to be created

        With sheetCharts.Shapes("Year Combo").ControlFormat

             .RemoveAllItems

         For lngYear = 2010 To CurYear

             .AddItem lngYear

         Next lngYear

             .ListIndex = .ListCount  'Set default value of combo box to last value (Current year)

        End With

    Call arrayLoader    Call YearCombo

End Sub

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2013-02-02T13:37:43+00:00

VBA will execute arrayLoader first, and when this has finished, it will execute YearCombo.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful