kannst mal so versuchen...
25.04.2010 09:49:51
Tino
Hallo,
vielleicht gehts ja hiermit, kannst ja mal testen.
Sub test()
Dim rngTmpCell As Range, RefZelle As Range
Dim sngLeft As Single, sngTop As Single
Dim booExit As Boolean
Const POINTS_Faktor As Long = 15
Set RefZelle = Range("B5") 'Suchzelle
With Application
If Intersect(RefZelle, ActiveWindow.VisibleRange) Is Nothing Then Exit Sub
For sngLeft = .Left To .Width
For sngTop = .Top To .Height
Set rngTmpCell = ActiveWindow.RangeFromPoint(sngLeft, sngTop)
If Not rngTmpCell Is Nothing Then _
If Not Intersect(RefZelle, rngTmpCell) Is Nothing Then _
booExit = True: Exit For
Next sngTop
If booExit Then Exit For
Next sngLeft
End With
If booExit Then
InputBox "test", , , sngLeft * POINTS_Faktor, sngTop * POINTS_Faktor
End If
End Sub
Gruß Tino