AW: aktivierte Zelle positionieren
17.01.2006 22:02:35
Uduuh
das klappt so ungef?hr:
Sub test()
Dim rng As Range, iRow As Long, iCol As Integer
Set rng = ActiveCell
iRow = ActiveWindow.VisibleRange.Rows.Count / 2
iCol = ActiveWindow.VisibleRange.Columns.Count / 2
If rng.Row > iRow Then
Application.Goto Cells(rng.Row - iRow, rng.Column), True
Else
Application.Goto Cells(1, rng.Column), True
End If
If rng.Column > iCol Then
Application.Goto Cells(ActiveCell.Row, rng.Column - iCol + 1), True
Else
Application.Goto Cells(ActiveCell.Row, 1), True
End If
rng.Select
End Sub
Gru? aus?m Pott
Udo