Creation Date Manipulation

georg7657

New Member
Joined
Jul 30, 2002
Messages
41
Suppose I wrote
MyDate = "01/01/04"

Well, is there any trick for assign - via VBA, without DOS command - MyDate
to the Creation-Date property of a generic XLS file?

I know,I know,I know: ThisWorkbook.BuiltinDocumentProperties are read-only properties, but I'm sure you can help me :biggrin:

Thanks.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Excel has no built-in way to do this that I am aware of. Maybe API calls can do it but I don't know what they are.

If you want to change the creation date from what it is now, then you will want to either place the date in the future or in the past.

Let's say the file was created on December 20, 2003. If you want to put the date in the future, for example if that future date is today's date (being "future" from the perspective of the December 20, 2003 date), then select all the sheets in your workbook and copy them (i.e. right click on the sheet and hit Move or Copy > Create a copy > New book). If you have VBA then you'd need to export those modules too. Save that new workbook which would give you a Today date of creation.

If you want a date in the past, then there is a download that can do that. As most people can probably tell by now, I'm not crazy about downloads generally, but this one, called PropertiesPlus, is able to manipulate the Creation date, which VBA is unable to do, so I tried it and it seems to work, if I correctly understand the objective of your post.

Here is the url (it's available elsewhere but here's one place, and it's free):
http://www.pcworld.com/downloads/file_description/0,fid,4979,00.asp

After you click the download link, and after it downloads, go into Explorer and double click it to install it. Then in Explorer, navigate to your file, right click on it, choose the Properties Plus menu option, and change the property(ies) you want to change, the Creation date being among the possibilities.

Hopefully this will get you closer to whatever it is you are trying to accomplish.
 
Upvote 0

Forum statistics

Threads
1,213,520
Messages
6,114,101
Members
448,548
Latest member
harryls

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top