Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Cell Change to Comment

Hi Everyone,

I found this code which is perfect for what I need to accomplish
except it doesn't do Formulas. i.e. Vlookups or direct links to other
workbooks.

Also this will only do Cell E5 in the work sheet I put it in. I would
like to get it to do it for cells A1:P500

I am a noob when it comes to VBA so please hang with me if I ask a
stupid question or two... ok three ;-)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 5 Then Exit Sub
If Target.Row < 5 Then Exit Sub
Dim ccc As String
ccc = Format(Date + Time, "mm/dd/yy hh:mm") _
& " " & Target.Value ' -- Application.UserName
If Target.Comment Is Nothing Then
Target.AddComment.Text ccc
Else
Target.Comment.Text (Target.Comment.Text & Chr(10) & ccc)
End If
Target.Comment.Shape.TextFrame.AutoSize = True
End Sub

Again any help would be appreciate. Thanks in Advance!!

Buck
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Cell Change to Comment

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1:P500")) Is Nothing Then Exit Sub
Dim ccc As String
ccc = Format(Date + Time, "mm/dd/yy hh:mm") _
& " " & Target.Value ' -- Application.UserName
If Target.Comment Is Nothing Then
Target.AddComment.Text ccc
Else
Target.Comment.Text (Target.Comment.Text & Chr(10) & ccc)
End If
Target.Comment.Shape.TextFrame.AutoSize = True
End Sub


This version will cover A1 thru P500.
--
Gary''s Student - gsnu2007i


" wrote:

Hi Everyone,

I found this code which is perfect for what I need to accomplish
except it doesn't do Formulas. i.e. Vlookups or direct links to other
workbooks.

Also this will only do Cell E5 in the work sheet I put it in. I would
like to get it to do it for cells A1:P500

I am a noob when it comes to VBA so please hang with me if I ask a
stupid question or two... ok three ;-)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 5 Then Exit Sub
If Target.Row < 5 Then Exit Sub
Dim ccc As String
ccc = Format(Date + Time, "mm/dd/yy hh:mm") _
& " " & Target.Value ' -- Application.UserName
If Target.Comment Is Nothing Then
Target.AddComment.Text ccc
Else
Target.Comment.Text (Target.Comment.Text & Chr(10) & ccc)
End If
Target.Comment.Shape.TextFrame.AutoSize = True
End Sub

Again any help would be appreciate. Thanks in Advance!!

Buck

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Cell Change to Comment

On May 30, 5:38*pm, Gary''s Student
wrote:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1:P500")) Is Nothing Then Exit Sub
Dim ccc As String
ccc = Format(Date + Time, "mm/dd/yy hh:mm") _
* * * & " " & Target.Value *' -- Application.UserName
If Target.Comment Is Nothing Then
* * * Target.AddComment.Text ccc
Else
* * * Target.Comment.Text (Target.Comment.Text & Chr(10) & ccc)
End If
Target.Comment.Shape.TextFrame.AutoSize = True
End Sub

This version will cover A1 thru P500.
--
Gary''s Student - gsnu2007i



" wrote:
Hi Everyone,


I found this code which is perfect for what I need to accomplish
except it doesn't do Formulas. i.e. Vlookups or direct links to other
workbooks.


Also this will only do Cell E5 in the work sheet I put it in. I would
like to get it to do it for cells A1:P500


I am a noob when it comes to VBA so please hang with me if I ask a
stupid question or two... ok three ;-)


Private Sub Worksheet_Change(ByVal Target As Range)
* *If Target.Column < 5 Then Exit Sub
* *If Target.Row < 5 Then Exit Sub
* * * Dim ccc As String
* *ccc = Format(Date + Time, "mm/dd/yy hh:mm") _
* * * & " " & Target.Value *' -- Application.UserName
* *If Target.Comment Is Nothing Then
* * * Target.AddComment.Text ccc
* *Else
* * * Target.Comment.Text (Target.Comment.Text & Chr(10) & ccc)
* *End If
* *Target.Comment.Shape.TextFrame.AutoSize = True
End Sub


Again any help would be appreciate. Thanks in Advance!!


Buck- Hide quoted text -


- Show quoted text -


Thanks Gary!!

Anyone have an idea on allowing this script to see Formulas?
Reply
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
Any way to change the color of the cell corner identifier that shows a comment is present? Keith R[_2_] Excel Discussion (Misc queries) 4 December 6th 07 02:12 PM
How to change text color in a cell "comment" in Office 2007? conductor Excel Worksheet Functions 1 June 2nd 07 02:50 AM
display comment on cell change samuel Excel Discussion (Misc queries) 4 April 9th 07 09:23 PM
I want to change comment printing cell 3 to whats in cell 3 Lonny and Rinda Excel Worksheet Functions 3 June 19th 06 08:36 PM
Cell comment boxes shouldn't change size/shape unless changed by u sam Excel Discussion (Misc queries) 1 March 3rd 05 05:23 PM


All times are GMT +1. The time now is 02:33 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"