Excel builtindocumentproperties


Posted by Neil on May 26, 2000 7:23 AM

Why, despite the property being set, does the following return an error

Sub nb()

MsgBox ActiveWorkbook.BuiltinDocumentProperties.Item(12).Value

End Sub

Posted by Celia on May 26, 2000 1:27 PM


Neil
I've just run your code and it works.
What error message are you getting ?
Celia


Posted by Ivan Moala on May 26, 2000 2:46 PM

Hi Niel
The above worked for me too.
It wont work though on a NEW workbook (recently)
created)
and applications aren’t required to define values for every built-in document property. If Microsoft Excel doesn’t define a value for one of the built-in document properties, reading the Value property for that document property causes an error. Because item 12 =
Last save time, this may be the cause ??

Ivan

Posted by neil on May 31, 2000 12:11 AM

Many thanks, this is the error that I get

Method value of object documentproperty failed

I have saved it and the last modified shows a value in File, Properties.

Why does it work on your system but not on mine?

I have a full install, using language "English UK"?

Very strange, I will try another machine and see waht happens.

Neil



Posted by Neil on May 31, 2000 5:26 AM

Sorted but not sorted

It would appear that the problem is due to the fact that I am using NT4W and not win 95/98.

Under Win 98 the code works but not under NT4.

One for Mr Gates me thinks.

Thanks to all for your help

Neil