I am having this problem
I have Userform with 1 Combox and 5 textboxes. When for example I select an Item in the combox and say the 1st textbox changes to "090123". When I change the number to "090129" it does not change in the corresponding cell in my worksheet. Here is my code:
Private Sub UserForm_Initialize()
Set xRg = Worksheets("My_Tables").Range("L2:Q7")
Me.ComboBox1.List = xRg.Columns(1).value
End Sub
Private Sub ComboBox1_Change()
Me.TextBox1.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.value, xRg, 2, False)
Me.TextBox2.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.value, xRg, 3, False)
Me.TextBox3.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.value, xRg, 4, False)
Me.TextBox4.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.value, xRg, 5, False)
Me.TextBox5.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.value, xRg, 6, False)
End Sub
Private Sub CommandButton1_Click()
Load Confirm_Update
End Sub
Private Sub CommandButton2_Click()
update_volume.hide
End Sub
Private Sub update_Click()
Dim answer As Integer
answer = MsgBox("Are you sure you want to update the Prover Volume.", vbYesNo + vbQuestion, "Update Prover Volume?")
If answer = vbYes Then
Unload update_volume
Else
End If
End Sub
Any help would be really appreciated.
I have Userform with 1 Combox and 5 textboxes. When for example I select an Item in the combox and say the 1st textbox changes to "090123". When I change the number to "090129" it does not change in the corresponding cell in my worksheet. Here is my code:
Private Sub UserForm_Initialize()
Set xRg = Worksheets("My_Tables").Range("L2:Q7")
Me.ComboBox1.List = xRg.Columns(1).value
End Sub
Private Sub ComboBox1_Change()
Me.TextBox1.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.value, xRg, 2, False)
Me.TextBox2.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.value, xRg, 3, False)
Me.TextBox3.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.value, xRg, 4, False)
Me.TextBox4.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.value, xRg, 5, False)
Me.TextBox5.Text = Application.WorksheetFunction.VLookup(Me.ComboBox1.value, xRg, 6, False)
End Sub
Private Sub CommandButton1_Click()
Load Confirm_Update
End Sub
Private Sub CommandButton2_Click()
update_volume.hide
End Sub
Private Sub update_Click()
Dim answer As Integer
answer = MsgBox("Are you sure you want to update the Prover Volume.", vbYesNo + vbQuestion, "Update Prover Volume?")
If answer = vbYes Then
Unload update_volume
Else
End If
End Sub
Any help would be really appreciated.