I have created an application which is used for processing data for many years. At the start up of the application, I ask the user to select a year from a userform combobox. I want this value to be treated as global string variable. I defined it in the following manner
Option Explicit
Public glbYr As String
Public Sub CommandButton2_Click()
glbYr = ComboBox1.Value
If glbYr <> "2012-13" And glbYr <> "2013-14" And glbYr <> "2014-15" Then
MsgBox "Please Select Appropriate Period for Assessment."
Call UserForm_Activate
End If
SelectYr.Hide 'This is user Form
End Sub
Then in a different module I was expecting that I would get the value of glbYr as received from this module. But I am getting null value.
Please suggest..
Sincerely
Vivekchha
Bookmarks