Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2013, 09:38 AM
MelHerndon MelHerndon is offline Make table cell active add date count date Windows 7 64bit Make table cell active add date count date Office 2010 64bit
Novice
Make table cell active add date count date
 
Join Date: Jan 2013
Posts: 3
MelHerndon is on a distinguished road
Default Make table cell active add date count date

Hi I have a word document that is used for documenting corrective actions issued against various departments at work. The document as it has been created has a table. In the table is an entry with the text "Date Raised:" I need to add some VBA code that(on document open) will identify the correct table cell, make it active, insert the current date. I will be adding another cell to an existing table in another section of the document that will have to populate with a date that is 30 days forward of the date that was inserted when the code triggers to add current date.

In Excel I would create my if then else and use date() to insert the current date.

Thanks for your help.



Mel
Reply With Quote
  #2  
Old 01-19-2013, 09:53 PM
fumei fumei is offline Make table cell active add date count date Windows 7 64bit Make table cell active add date count date Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

Well I would hope that you are doing it as a real template, rather than a document open. After all, if the document is opened again, then the code will run again...thus changing the date. Surely this is not what you want.

If it was a template, using Document_New (not open), then the date would go in once (and only once).

That aside, you probably do not need to "activate" the cell - there is no activate BTW.

Perhaps use a bookmark. In which case the current date could be inserted at the bookmark. You could do this directly, with no need to "activate". This could also add 30 days to another bookmark value.

BTW: is the text "Date Raised:" already in the cell?
Reply With Quote
  #3  
Old 01-21-2013, 03:43 AM
MelHerndon MelHerndon is offline Make table cell active add date count date Windows 7 64bit Make table cell active add date count date Office 2010 64bit
Novice
Make table cell active add date count date
 
Join Date: Jan 2013
Posts: 3
MelHerndon is on a distinguished road
Default

fumei thanks for the response. Actually the document will be stored on the intranet so I do want it to put the current date in it everytime it is opened. We don't want users to open and edit already created documents since there have been mistakes where instead of using save as they have used save which then loses the document trail and goofs up the file naming convention. The date raised cell is not populated and there will be code to check to see if one already exists, if so the document will protect to disallow edits forcing the person to go on the intranet and use the blank document. I will look at bookmarks and see what I can find. I tried just creating a macro, but once it is started it disallows clicking in the date raised cell to do any more with.

Regards,

Mel
Reply With Quote
  #4  
Old 01-21-2013, 04:23 PM
fumei fumei is offline Make table cell active add date count date Windows 7 64bit Make table cell active add date count date Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

So where is "Date Raised:" ? In a different cell?

Honestly, I am not really up to snuff on files coming from an intranet; what is allowed, what is not. I am not sure that a real template is still not the way to go.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Make table cell active add date count date Inserting a date calculated from a table cell theMikeD Word 2 09-11-2012 05:46 PM
Make table cell active add date count date Meaning of current date vs status date when saving baselines ketanco Project 1 02-08-2012 02:20 PM
Make table cell active add date count date How do I lock in a Date in a cell? GatorFan1 Excel 2 12-02-2011 09:33 PM
How to count year lapse (rounded off) based on specific date KIM SOLIS Excel 1 11-01-2011 10:50 AM
How can I make a cell color RED under the Today's date cell? Learner7 Excel 2 07-08-2010 12:52 AM

Other Forums: Access Forums

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