Selecting the next row up or down??????
Thanks Gary that works but I need it to select the data on that row from
sheet2.
I have the following code so far (without your code in). The data is found
on sheet2
Private Sub CommandButton4_Click()
Dim FoundCell As Range
ActiveCell.Offset(-1, 0).Select
If FoundCell Is Nothing Then
'this shouldn't happen!
Beep
Else
Me.TextBox1.Value = FoundCell.Offset(0, 1).Value
Me.ComboBox1.Value = FoundCell.Offset(0, 1).Value
Me.TextBox2.Value = FoundCell.Offset(0, 2).Value
If IsDate(FoundCell.Offset(0, 0).Value) Then
Me.TextBox1.Value = Format(FoundCell.Offset(0, 0).Value, "dd-mmm-yy")
Else
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
End If
End If
End Sub
any ideas?
--
Bob
"Gary''s Student" wrote:
To select the next row down from where you a
Sub OneRowDown()
ActiveCell.Offset(1, 0).EntireRow.Select
End Sub
--
Gary''s Student - gsnu200845
"Bob" wrote:
I have a userform with several textboxes which I fill in data and save to a
data sheet. It also has a search facility by inserting a date in textbox1 and
pressing a commandbutton, it brings up data from that row.
I am trying to find a way to select the next row up or down and have the
data display. So that I can select a date and have the data displayed then go
up or down the rows from that date.
--
Bob
|