Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Many thanks that works but I need it to select the data on that row from
sheet2 to several textboxes on a userform. I have the following code so far. 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 Your code is modified. Could check it over. Many thanks -- Bob "DILipandey" wrote: Hi Bob, Try following:- To select next up row:- ActiveCell.Offset(-1, 0).EntireRow.Select To Select next down rol:- ActiveCell.Offset(1, 0).EntireRow.Select Thanks. -- Click on Yes, if it is useful. Thanks & Best Regards, Dilip Kumar Pandey MBA, BCA, B.Com(Hons.) New Delhi, India "Bob" wrote: -- Bob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to select cells without a certain value and select a menu it | Excel Worksheet Functions | |||
Using formulas to select cells (Ex: Select every nth cell in a col | Excel Discussion (Misc queries) | |||
how to randomly select a name in a list and then the select the ne | Excel Worksheet Functions | |||
In Excel 2000, How do you select the whole of a worksheet (Select. | Excel Discussion (Misc queries) | |||
In Excel 2000, How do you select the whole of a worksheet (Select. | Excel Discussion (Misc queries) |