I am unable to get the Userform Initialize function to work.
I have a commandbutton on Userform4 which I want to use to launch Userform2. I can launch Userform2 using the Show command, but then it bye-passes the Userform2_Initialize() routine (shown below).
I have been told not to put the "2" after "Userform" in the Initialize sub routine, but this does not work either.
Any thoughts?
Code
Private Sub Userform2_Initialize()
Set wsActive = ActiveSheet
'Clear controls for next entry and set default box
TextShares.Value = ""
TextPrice.Text = ""
TextShares.SetFocus
'Populate text boxes with data from the spreadsheet
TextTicker.Text = Range("Sheet1!C4").Value
TextCountry.Text = Range("Sheet1!C7").Value
TextCurrency.Text = Range("Sheet1!C6").Value
TextDate.Text = Range("Sheet1!C8").Value
TextExchangeRate.Text = Range("Sheet1!C9").Value
End Sub
Display More