Cowichandave
New Member
- Joined
- Jan 18, 2009
- Messages
- 44
- Office Version
- 2016
This is a worksheet with 2 forms Columns A:J and Columns K:T
Data is entered in rows 7 to 55 and user is prevented from scrolling outside this area. How do I modify the following script. At present it allows me to search and enter data in the first blank row up to row 55. I would like it to detect when row 55 is full and then unlock the scroll area and move to columns K:T and relock the scroll area for those columns. This is a 2 sided form that is printed
Private Sub Worksheet_Activate()
For irow = 7 To 55
If Application.CountBlank(Cells(irow, 1).Resize(1, 10)) = 10 Then
Cells(irow, 1).Select
Exit For
End If
Next
ActiveSheet.ScrollArea = "A1:J60"
End Sub
Data is entered in rows 7 to 55 and user is prevented from scrolling outside this area. How do I modify the following script. At present it allows me to search and enter data in the first blank row up to row 55. I would like it to detect when row 55 is full and then unlock the scroll area and move to columns K:T and relock the scroll area for those columns. This is a 2 sided form that is printed
Private Sub Worksheet_Activate()
For irow = 7 To 55
If Application.CountBlank(Cells(irow, 1).Resize(1, 10)) = 10 Then
Cells(irow, 1).Select
Exit For
End If
Next
ActiveSheet.ScrollArea = "A1:J60"
End Sub