Die Excel/VBA-Beispiele (incl. aller Arbeitsmappen: http://www.herber.de/samples/inhalt.html)

Scrollbereich begrenzen

Problem: Wie kann ich den Bewegungsraum des Cursors einschränken?


ClassModule: Tabelle1

Private Sub cmdBegrenzung_Click()
   If ActiveSheet.ScrollArea = "" Then
      Cells.Interior.ColorIndex = 15
      Selection.Interior.ColorIndex = xlColorIndexNone
      ActiveSheet.ScrollArea = Selection.Address
   Else
      ActiveSheet.ScrollArea = ""
      Cells.Interior.ColorIndex = xlColorIndexNone
   End If
End Sub