Selecting Cells

  • Thread starter Thread starter LRay67
  • Start date Start date
L

LRay67

When a user is in cell K10 (merged cells going to V10) and tabs, I would like
it to go to A15. Anyone know the code behind this. The code below is what I
have stated in ThisWorkbook Code, but still doesn't eliminate the user from
going past K10? Any help would be appreciated. Thanks


Private Sub Workbook_SheetActivate(ByVal sh As Object)
With ActiveSheet
.ScrollArea = "A1:V96"
End With
End Sub
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column > 10 Then Set Target =
Target.Worksheet.Cells(Target.Row + 1, 1)
If Target.Row > 10 Then Set Target = Target.Worksheet.Cells(1, 1)
Target.Activate
End Sub

This won't let the user enter a cell that is outside the range A1:J10
in the worksheet.

Cheers,
Jason Lepack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top