I have an excel file with 2 buttons which access two different modules. Can we access a variable of a module in another module after running the program which calls that module?
My modules look like this
1st module..
Public Sub Directory_Path()
Dim Directory As String
Directory = InputBox("Enter the Directory path that contains folders ""This Quarter"",""Last Quarter"",""Second_Last_Quarter"".")
If Right(Directory, 1) = "\" Then
Directory = Left(Directory, Len(Directory) - 1)
End If
End Sub
I called the the first module in 2nd module using Public Sub Directory_Path() . I want Directory variable in first module to be used as a variable in 2nd module...