Hello. How to pass variable from module to the userform, namely to texbox.
In order to do that I use that userform code, namely commandbutton code.
And mudule codeOption Explicit Private Sub CommandButton1_Click() addr = Form2.RefEdit1.Value n1 = Form2.TextBox1.Value TextBox2 = g1 'Unload Me End Sub ....
And user form gives an output as 0 instead of 5.Public g1 As Double Sub Sim() Form2.Show g1=5 End Sub
Should I call sub sim somehow or...?