Hi Zrx,
You have a couple of options on how to pass "month", but there is one absolute requirement ... namely, your Main routine needs to be ready to accept it.
You could use any of the following declaration statements for Main:
Using "Optional" means that the "calling" routine can (but does not have to) pass "month" to "Main". To use the "optional" option, you would need to re-write Main to work either with or without "month" being passed.
The byRef and byVal determine whether or not Main can change "month". In this case it does not matter because calling Main is the last thing your form does (right?).
The calling statement can look like either of these:
Oh ... one other thing ... month must be dimensioned exactly the same in both routines. So, if you use "month As String" in the declaration of Main, then you must use "Dim month As String" in the calling routine.
Hope this helps.
Bookmarks