ich möchte mit einem Makro horizontal soweit scrollen, so das die spalte "X" mittig meines bildschirms steht.
Gibt es dafür ein vba?
gruss
Fred
Code:
[Cc]
Sub Setze_X_Mittig()
Dim i As Integer, l As Currency
l = Cells(1, "X").Width \ 2
For i = 25 To 1 Step -1
l = l + Cells(1, i).Width
If l > (ActiveWindow.VisibleRange.Width \ 2) Then Exit For
Next i
If i > 2 Then i = i - 1 Else i = 1
ActiveWindow.ScrollColumn = i
End Sub