Script Needed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a script that will set a date. Basicly, if some condition goes 'true'
then a date will be set and will stay forever.

Does anyone know one?

Larry Ricci
 
Embedded said:
I need a script that will set a date. Basicly, if some condition goes 'true'
then a date will be set and will stay forever.

Does anyone know one?

Larry Ricci

Hi Larry,

as you don't provide any context, I try to guess:

- you want this date value visible on a custom form

Then you can insert a label control named 'Label1' on your form.

Now you can address this Label with

item.getinspector.modifiedformpages("MyPageName")_
..controls("Label1").value = now

If I guessed wrong, you should consider to provide some more detail.


Wolfram
 
Do you mean something like this?

Sub SetDate(bTestVar, varDate)
If bTestVar Then
varDate = CStr(Date())

Else
varDate = CStr(CDdate("#1/1/4501#"))
End If
End Sub

OR

Function SetDate(bMyTest)
If bMyTest Then
SetDate = CStr(Date())

Else
SetDate = Cstr(CDate("#1/1/4501#"))
End If
End Function
....
varDate = SetDate(bTestVar)


bTestVar/bMyTest is your TRUE/FALSE fo rsetting the date, and varDate
is the variable that accepts the current date, or is set to the
default doesn't exist date for Outlook.
 
Back
Top