Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have code which will add a comment box two cells to the right whenever a date is placed in column "N". There is text within this comment box which is added by the code and takes the date from "N" and adds 14 (days). On occasion, I will need to overide the 14 days with a number from column "M" which is manually input into that cell. So, in eccence, I need someting like: If (M5="",N5+14,N5+M5) but in the following code: Dim strTemp As Date 'adds a comment box to cells in column P when date is entered in N On Error Resume Next If Not Intersect(Target, Me.Range("N4:N9999")) Is Nothing Then With Target If .Value < "" Then Application.EnableEvents = False strTemp = Target.Offset(0, 3).Text Target.Offset(0, 2).AddComment UserName() & " - AoS due by: " & Format(Target.Value + 14, "dd mmm") Target.Offset(0, 2).Comment.Shape.TextFrame.AutoSize = True 'On Error GoTo 0 Application.EnableEvents = True End If End With End If Any ideas??? -- Traa Dy Liooar Jock |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA code with and / or statement | Excel Programming | |||
Help Identifying code statement | Excel Discussion (Misc queries) | |||
If statement to replace #VALUE! code | Excel Worksheet Functions | |||
VBA code for IF statement with OR? | Excel Programming | |||
Code doesn't go past first IF statement | Excel Programming |