Right now, my macro starts Module1 [Sub simpleXlsMerger()], which opens a userform that collects start and end dates using 2 datepicker controls. The dates are collected in another sub procedure [Private Sub CmdOK_Click()]. How do I pass these dates back to Module1? Ive read that I need to use public instead of Dim, but it doesnt work with Subs. Instead, I get the message, Invalid attribute in Sub or Function.
What changes can I make to pass these dates back to Module1? And where do the Public variable declarations go? In Module1 or CmOK_Click()? Thank you. I hope you can help.
What changes can I make to pass these dates back to Module1? And where do the Public variable declarations go? In Module1 or CmOK_Click()? Thank you. I hope you can help.