Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 07-22-2011, 02:07 AM
Neoxis Neoxis is offline word 2003 date picker Windows Vista word 2003 date picker Office 2007
Novice
 
Join Date: Jul 2011
Posts: 1
Neoxis is on a distinguished road
Default

Quote:
Originally Posted by Kimberly View Post
By default the first calendar you insert is named Calendar1
By default the second calendar you insert is named Calendar2
(right-click on a calendar and choose Properties to see this)

So if Calendar1 is for EffectiveDate: , the code should look like:

Code:
Private Sub Calendar1_Click()
    Selection.HomeKey Unit:=wdStory
    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "EffectiveDate: "
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=11, Extend:=wdExtend
    Selection.Text = Format(Calendar1.Value, "mmm dd yyyy")
End Sub
If the ExpirationDate: calendar is named Calendar2, then the code will be like the above, with three exceptions... the calendar name (twice) and the text to find. I suspect you did not edit the final line to be the value for Calendar2.
ei man i tried what you said and changed the those 3 (i.e. Calendar1->Calendar2)


however whenever i choose the second date of the same calendar it's not the Text in the " .Text = "EffectiveDate: " " is not the one changed. How can i solve this thanks...
Reply With Quote
  #17  
Old 04-06-2012, 04:12 AM
erikgutten erikgutten is offline word 2003 date picker Mac OS X word 2003 date picker Office for Mac 2011
Novice
 
Join Date: Apr 2012
Posts: 1
erikgutten is on a distinguished road
Smile

Hey, why not use bookmark instead, and create a form, where the user enters the date. Or use a textfield. Then in my experience, the date will appear where you placed the bookmarks, depending your need, ofcource
Much more convenient, than recording macro, i think at least.

Or, you can use ask fields.

Otherwise G.Mayor, has a great tutorial here:
http://www.gmayor.com/popup_calendar.htm

Just a thought.

Good luck
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculations using values from date picker controls Inkarnate Word 0 06-09-2010 07:16 AM
Date Function in word? aligahk06 Word 1 04-21-2010 06:33 AM
Word 2007 date and time picker dmcohio Word 2 04-09-2010 04:13 AM
new appointment date always reverts back to today's date msills Outlook 0 08-24-2007 08:57 AM
word 2003 date picker Imported message date change to today's date promark Outlook 1 12-23-2005 07:21 AM

Other Forums: Access Forums

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


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