Option
Explicit
Option
Private
Module
Private
Declare
Function
SetTimer
Lib
"user32.dll"
( _
ByVal
hwnd
As
Long
, _
ByVal
nIDEvent
As
Long
, _
ByVal
uElapse
As
Long
, _
ByVal
lpTimerFunc
As
Long
)
As
Long
Private
Declare
Function
KillTimer
Lib
"user32.dll"
( _
ByVal
hwnd
As
Long
, _
ByVal
nIDEvent
As
Long
)
As
Long
Public
Sub
prcStartTimer()
SetTimer Application.hwnd, 0&, 1&,
AddressOf
TimerProc
End
Sub
Public
Sub
prcStopTimer()
KillTimer Application.hwnd, 0&
End
Sub
Private
Sub
TimerProc(
ByVal
hwnd
As
Long
,
ByVal
nIDEvent
As
Long
, _
ByVal
uElapse
As
Long
,
ByVal
lpTimerFunc
As
Long
)
Static
sobjRange
As
Range
On
Error
Resume
Next
If
ActiveCell.Borders(xlEdgeBottom).LineStyle = xlNone
Then
_
Set
sobjRange = ActiveCell
If
ActiveCell.Borders(xlEdgeBottom).LineStyle <> xlNone
And
_
ActiveCell.Address = sobjRange.Address
Then
_
Cells(1, 1) = ActiveCell.Address &
" ist unterstrichen"
If
Err
Then
Set
sobjRange =
Nothing
End
Sub