Within Excel VBA I have a User Form similar to the following where the user enters an ID number and then the details are displayed on the user form:
Private
There are serveral ways to solve this problem. The one that I use is declare global or public variable in module
Example:
Public commonVariable As String
then in userform you can assign or retrieve value from this variable. For example in userform1:
Private Sub btnIDNo_Click()
commonVariable = "UserId"
End Sub
in UserForm2:
Private Sub CommandButton1_Click()
me.txtIDNo.Text = commonVariable
End Sub