Consulting

Results 1 to 10 of 10

Thread: Getting The Cells to focus!!! Using FOR LOOP to find and select only the last row)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Apr 2018
    Posts
    50
    Location

    Getting The Cells to focus!!! Using FOR LOOP to find and select only the last row)

    I'm using MS Office 2010. win7

    Somehow I've gotten the selected new rows to focus rather than the most recent one.

    I need to use FOR Loop to find and select only the last row.

    this what i have so far:
    Option Explicit
    Private Sub CommandButton1_Click()
    Dim pass As String
        pass = "abc1234"
        ActiveSheet.Protect Password:=pass, UserInterFaceOnly:=True
    
    
    With Range("A17:A42").SpecialCells(xlVisible).Areas(1)
          .Offset(.Count).Resize(1).EntireRow.Hidden = False
       
       ActiveSheet.Range("b19:d42").Select
       
       End With
    End Sub
    Thankful for any and all help!!! Thanks a Million
    Last edited by Bob Phillips; 06-13-2018 at 11:21 AM. Reason: Added code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •