Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Select the next row up or down/


--
Bob
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Select the next row up or down/

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Select the next row up or down/

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to select cells without a certain value and select a menu it Guy[_2_] Excel Worksheet Functions 9 January 2nd 09 05:21 PM
Using formulas to select cells (Ex: Select every nth cell in a col Lakeview Photographic Services Excel Discussion (Misc queries) 2 March 15th 07 02:17 PM
how to randomly select a name in a list and then the select the ne [email protected] Excel Worksheet Functions 1 September 20th 06 08:09 AM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 5th 05 12:03 AM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 4th 05 11:59 PM


All times are GMT +1. The time now is 02:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"