J
joe schmo
I'm writing a form in Outlook 2003. The code on the form is as follows:
Sub Item_CustomPropertyChange(ByVal Name)
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Textbox1= myPage1.Controls("Textbox1")'type is Date/Time'
Set Textbox2= myPage1.Controls("Textbox2")'type is Date/Time'
Set Textbox6= myPage1.Controls("Textbox6")'type is not set, or is number'
Textbox6.value = DateDiff("d",Textbox1.value,Textbox2.value)
When i run this I get "type mismatch string:none" error on the last line,
but the code works when I fill in the boxes.
What am I doing wrong? thanks all
Sub Item_CustomPropertyChange(ByVal Name)
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Textbox1= myPage1.Controls("Textbox1")'type is Date/Time'
Set Textbox2= myPage1.Controls("Textbox2")'type is Date/Time'
Set Textbox6= myPage1.Controls("Textbox6")'type is not set, or is number'
Textbox6.value = DateDiff("d",Textbox1.value,Textbox2.value)
When i run this I get "type mismatch string:none" error on the last line,
but the code works when I fill in the boxes.
What am I doing wrong? thanks all