Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-08-2013, 11:09 AM
JoeE JoeE is offline Comparing dates in legacy control text box Windows XP Comparing dates in legacy control text box Office 2007
Novice
Comparing dates in legacy control text box
 
Join Date: Apr 2013
Location: Louisville, KY
Posts: 1
JoeE is on a distinguished road
Default Comparing dates in legacy control text box

I have two legacy control fields "Begin" and "End" in a Word 2007 form. I defined the type as "Date" in the text form field options. I was hoping to write a macro that would run on exit from the End date to warn the user if the End date is before the Begin date. I'm not having much luck. I finally had the macro output a message box with the value in the date fields, and no matter the date, the value is always 70.



Am I trying to do something that isn't possible, or am I just too much of a newbie at VBA to figure out how to do it?

Here's what I was trying to do:
Sub End_Date()
'
' End_Date Macro
'
'
If ActiveDocument.FormFields("End") <= ActiveDocument.FormFields("Begin") Then
MsgBox "Term ending date must be after beginning date."
End If
End Sub

Thanks,
Joe
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing dates in legacy control text box Comparing 2 columns of Text Berk21 Excel 9 02-03-2012 12:19 PM
Using legacy forms with text boxes? Any way around this? svengoolie Word 1 02-01-2012 11:53 AM
Comparing dates in legacy control text box Word 2003 - IncludeText Does Not Include Bookmark Text if in a Form Text Control skarden Word 1 12-12-2011 10:39 PM
Can't open .pst legacy files RetiredEngineer Outlook 1 11-14-2009 01:06 PM
Templates: automatic text generation from Rich Text content control Chickenmunga Word 0 10-01-2008 11:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft