Hi,
Can somebody help me highlight the row of the cell last updated, here is the code
Thanks,
HYKE
Can somebody help me highlight the row of the cell last updated, here is the code
Code:
Private Sub CommandButton1_Click()
Dim r As Long
With Sheet1
r = Application.Match(ComboBox1.Value, .Range("B:B"), False)
.Cells(r, 4).Value = .Cells(r, 4).Value + Val(TextBox2.Value)
.Cells(r, 5).Value = .Cells(r, 5).Value + Val(TextBox3.Value)
.Cells(r, 6).Value = .Cells(r, 6).Value + Val(TextBox4.Value)
.Cells(r, 7).Value = TextBox5.Value
.Cells(r, 8).Value = TextBox6.Value
.Cells(r, 9).Value = TextBox7.Value
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
ComboBox1.Value = ""
[COLOR=red]Rows(ActiveCell.Row).Select - this code does not make the last updated cell as active.[/COLOR]
End With
End Sub
Thanks,
HYKE