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: 440
Default Adding dates within a comment

This first part I can get to work fine:
If a date is entered in A1, a comment will appear in C1 showing the date
(from A1) plus 10 days.
If a date is then entered in B1, the comment in C1 will be amended to the
date from B1 plus 10 days.

What I am struggling with is:
If a date is entered in A1, a comment will appear in C1 showing the date
(from A1) plus 10 days. (same as above)
However, if a date is then entered in B1, the comment in C1 will be amended
to the date from A1 plus 10 days.
partial code below:

Error Resume Next
If Not Intersect(Target, Me.Range("B4:B30")) Is Nothing Then
With Target
If .Value < "" Then
Application.EnableEvents = False
strTemp = Target.Offset(0, 1).Comment.Text
Target.Offset(0, 1).ClearComments
Target.Offset(0, 1).AddComment.Text Text:=strTemp ' & " " & "AoS
filed. Defence now due by: "
On Error GoTo 0
Application.EnableEvents = True
End If

How do I get the code to look at column A rather than the Target column B
and use the date in A?
--
Traa Dy Liooar

Jock
 
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
Adding a variable value to a comment? Tom Excel Programming 5 March 10th 06 11:26 PM
Adding a new comment with a function? Cheese Excel Discussion (Misc queries) 4 July 31st 05 11:46 AM
Adding Comment and AutoSizing Troy[_3_] Excel Programming 0 May 27th 04 01:06 AM
Adding Comment to cell Troy H Excel Programming 5 May 14th 04 09:31 AM
Adding comment programmatically Carl Rapson Excel Programming 3 February 26th 04 11:01 PM


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

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

About Us

"It's about Microsoft Excel"