View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John in Surrey
 
Posts: n/a
Default Fill Cell to the right

Hi folks
I wish to paste data from a form into the first aviable row (bed) of
our ward database...

Private Sub cmdAdmitPatient_Click()
For Each c In Worksheets("admission").Range("B5:B29")
If c.Value = " " Or c.Value = "" Then
c.Value = txtName.Value
'<cell to the right = txtDateOfBirth.Value
'<cell to the right again = txtNextOfKin
Exit For
End If
Next
End Sub

as you can see, Ive found the first blank row / bed and pasted in the
patient name, how do I move to the right one cell to paste the DOB
then ditto again for the next field

thanks
john
Images of home (NZ)
http://www.titahi-bay.co.nz/home
What we are up to in the UK
http://www.titahi-bay.co.nz