sooty8
05-07-2010, 08:39 AM
Hi All
The Code below works OK and puts the info in the correct cell - my problem is I don't want it to go in the same cells every time I need it to find the next empty column always on row 1.
Private Sub Add_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("DATA")
ws.Cells(1, 10).Value = Tb5.Value
Sheets("DATA").Select
Range("J1:K1").Select
With Selection
.HorizontalAlignment = xlCenterAcrossSelection
End With
End Sub
Regards
Sooty8
The Code below works OK and puts the info in the correct cell - my problem is I don't want it to go in the same cells every time I need it to find the next empty column always on row 1.
Private Sub Add_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("DATA")
ws.Cells(1, 10).Value = Tb5.Value
Sheets("DATA").Select
Range("J1:K1").Select
With Selection
.HorizontalAlignment = xlCenterAcrossSelection
End With
End Sub
Regards
Sooty8