View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark Cover Mark Cover is offline
external usenet poster
 
Posts: 19
Default Enter data in next empty row after cell name

I need some help entering data from a form. I have the sheet activaced and
want to select the next row after a paticular name and past information from
that cell.
I hope this is clear: Here is what i have.

Private Sub cmdAdd_Click()
Dim iRow As Long
Dim LastRow As Object
Set ws = ThisWorkbook.ActiveSheet()
Set LastRow = ws.Range("a65536").End(xlUp)
LastRow.Offset(1, 0).Value = txtCust.Text
LastRow.Offset(1, 1).Value = txtService.Text
LastRow.Offset(1, 2).Value = txtCircuit.Text

Thanks -mark