Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2016, 02:00 AM
macropod's Avatar
macropod macropod is offline Working with Dates in Word VBA Windows 7 64bit Working with Dates in Word VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,371
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try something based on:
Code:
Sub Demo()
Dim MyDate As Date
MyDate = CDate(InputBox("Please input a date", "Date Entry"))
MsgBox "The # days difference between the input date and today is:" & vbCr & vbTab & Int(Now() - MyDate)
End Sub

__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
wordvba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Working with Dates in Word VBA Assistance with VBA Code to identify and highlight dates in a word doc shaunlthomas Word VBA 1 08-13-2015 05:25 PM
Working with Dates in Word VBA Printing a series in Word docs with future dates Rocky Vet at VAMC Word 2 04-04-2015 04:36 PM
Working with Dates in Word VBA Changing Actual Finish dates changes original Finish dates SomewhereinTX Project 3 12-20-2013 10:25 AM
Working with Dates in Word VBA Sequential Dates in Word Ultrap3 Word 2 02-04-2011 02:53 PM
Stop Word from changing Folder DATES? binar Word 0 08-12-2010 05:53 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:15 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