View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Minitman[_4_] Minitman[_4_] is offline
external usenet poster
 
Posts: 273
Default Syntax To Insert A Number Into One TrxtBox If A Different TextBox Has A Date That Is = 1/1/98 - SOLVED

Hey Erik,

That was the answer - I did not have TextBox1 Dimmed as a date. Thank
you, this now works.

-Minitman

On Thu, 11 Nov 2004 22:17:31 -0800, "E Oveson"
wrote:

Hey Minitman,

try this:

Dim date1 As Date

date1 = TextBox1.Value
If date1 = "9/15/1998" Then
TextBox2.Value = "8.25%"
Else
TextBox2.Value = "8%"
End If

-Erik

"Minitman" wrote in message
.. .
Greetings,

In an Exit event I need to see if the date value in TextBox1 is =
9/15/1998. If yes, then the value in TextBox 7 needs to be .0825. If
not, the value in TextBox7 needs to be.08.
I tried this:

If TextBox1.Value = "9/15/1998" Then
TextBox7.Value = "8.25%"
Else:
TextBox7.Value = "8%"
End If

But it only returns .0825 in TextBos7, no matter what the date is in
TextBox1.

What am I doing wrong?

Can anyone help me?

TIA

-Minitman