View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tskogstrom tskogstrom is offline
external usenet poster
 
Posts: 92
Default OnTime code error "can't execute code in break mode"

Hi,
Please give advice why I get error.

When I step into RunInvComment code, it first mark first line but
doesn't trigger "ShowComment". Then it mark second line and show error
"You can't execute code in break mode". Of cource I when I started to
step into this, it was_not_break_mode.

Sub RunInvComment()
Application.OnTime Now + TimeValue("00:00:00"), "ShowComment"
Application.OnTime Now + TimeValue("00:00:03"), "Deletecomment"
End Sub

Sub Deletecomment()
Selection.ClearComments
End Sub

Sub ShowComment()
Selection.AddComment "This is a 3 sec Comment !"
Selection.Comment.Visible = True
End Sub

Kind reagrds
tskogstrom