According to my googling research, to code the data to populate into the Userform during the initialize event, means reversing the code that puts the code onto the worksheet. Is this correct?
So, this code:
Private Sub Enter_CommandButton1_Click()
With Worksheets("JobIntvwData") 'The following data will be stored on the worksheet called JobIntvwData
'Requistion Tab
Sheet4.Range("A2") = Me.ReqRcvd
Sheet4.Range("B2") = Me.ReqNo
Sheet4.Range("C2") = Me.RecruiterComboBox
Sheet4.Range("D2") = Me.HMComboBox
Sheet4.Range("E2") = Me.Job_Title
Sheet4.Range("F2") = Me.Relo_Avail
Sheet4.Range("G2") = Me.JobLocation_ComboBox
Sheet4.Range("H2") = Me.JC_SG
Sheet4.Range("I2") = Me.BusinessUnit_ComboBox
Sheet4.Range("J2") = Me.HM_Called
End With
End Sub
would turn into this code....
With Worksheets("JobIntvwData") 'The following data will be taken from the worksheet called JobIntvwData
'Requistion Tab
Me.ReqRcvd = Sheet4.Range("A2")
Me.ReqNo = Sheet4.Range("B2")
Me.RecruiterComboBox = Sheet4.Range("C2")
Me.HMComboBox = Sheet4.Range("D2")
Me.Job_Title = Sheet4.Range("E2")
Me.Relo_Avail = Sheet4.Range("F2")
Me.JobLocation_ComboBox = Sheet4.Range("G2")
Me.JC_SG = Sheet4.Range("H2")
Me.BusinessUnit_ComboBox = Sheet4.Range("I2")
Me.HM_Called = Sheet4.Range("J2")
End With
And I would place that code into the into the following Initailize event, just after 'Call PopCandidateCombo'?
Private Sub UserForm_Initialize() 'These are the lines of code that populates the combobox.
Call PopCandidateCombo
End Sub
Bookmarks