LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Code seems to crash after clearing comments

Hello Excel users and experts,

Excell 2002

I offered this code to a poster about four or five posts below this one
(Lucas Budlong, 1:13PM) and now I find that when I clear the series of the
comments it produces in column A, it will not work again until I close Excel
and reopen. That ain't no good!!

Any ideas where I am going wrong?

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
If Target < Range("F1") Then Exit Sub
Range("A100").End(xlUp).Offset(1, 0).Select

With Selection
.AddComment
.Comment.Text Text:=Range("E1").Value & ":" _
& Chr(10) & Range("F1").Value
.Comment.Visible = True
.Value = Range("F1").Value
End With

Range("F1").ClearContents
Range("F1").Select
Application.EnableEvents = True
End Sub

Thanks,
Howard



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - Clearing All Comments Jeff Lowenstein Excel Discussion (Misc queries) 0 April 10th 09 11:22 PM
Code crashes after clearing comments L. Howard Kittle Excel Worksheet Functions 2 February 20th 06 04:54 AM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM
Problem with code causing Excel '97 to crash Pozzo[_6_] Excel Programming 0 June 16th 04 08:19 PM
Excel crash error code Ed[_17_] Excel Programming 1 February 16th 04 10:46 AM


All times are GMT +1. The time now is 12:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"