Quote Originally Posted by xld View Post
Use

Cells(Rows.count, "A").End(xlUp).EntireRow.Select
i got an error when i added to what i got


Private Sub CommandButton1_Click()
Dim pass As String
pass = "nh1234"
ActiveSheet.Protect Password:=pass, UserInterFaceOnly:=True


With Range("A17:A42").SpecialCells(xlVisible).Areas(1)
.Offset(.Count).Resize(1).EntireRow.Hidden = False

Cells(Rows.Count, "A17:A42").End(xlUp).EntireRow.Select

ActiveSheet.Range("b19:d42").Select

End With
End Sub