CORRECTION.
My mistake.
As i had an IF statement, i placed it in the option 2 and the option 1 was
selected and thus didi not work.
You code works greate TOM.
Thank you.
"Coza" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks for the Reply Tom,
> BUT i STILL get the code adding DAYS and NOT years???
>
>
> Corey
>
>
> "Tom Ogilvy" <(E-Mail Removed)> wrote in message
> news:FE19D172-A938-4D3E-85C0-(E-Mail Removed)...
>> Try:
>> Range("D2").Value = DateAdd("yyyy", Clng(TextBox11.Value),
>> cdate(TextBox4.Value))
>>
>> I guess Range("D2").Text was for illustration since that would raise an
>> error.
>>
>> ? dateAdd("yyyy",3,Date)
>> 03/23/2010
>>
>> ? dateAdd("yyyy",3,"11/22/1998")
>> 11/22/2001
>>
>>
>> --
>> Regards,
>> Tom Ogilvy
>>
>>
>> "Coza" wrote:
>>
>>> Range("D2").Text = DateAdd("yyyy", TextBox11.Value, TextBox4.Value)
>>>
>>> Why does this not add years?
>>>
>>> Textbox11.value = "5"
>>>
>>> Ctm
>>>
>>>
>>>
>
>
|