I have the following code in excel vba:
Sub main()
Call Get_Rows_Generic("usersFullOutput.csv", 1)
End Sub
in another module i have:
Sub Get_Rows_Generic(work_sheet As String, column_num As Integer)
Dim wsUsers As Worksheet: Set wsUsers = Worksheets(work_sheet)
Dim userRows As Integer: userRows = wsUsers.Cells(Rows.Count, column_num).End(xlUp).Row
MsgBox userRows
End Sub
How do i access the results of the sub Get_Rows_Generic
(what is shown in the MsgBox
) outside of the sub? i.e. feed the result into another sub or cell...etc.