reading custom properties in Vb


Posted by Bob Sargeant on January 11, 2002 12:59 AM

I have been using dsofile from the microsoft development site to read the custom properties. However I find that I can only read 7 dates correctly out of 8 requested from my excel sheet.
I am using named cells linked to custom properties, and using dsofile. The last (8th) date comes out as unknown. The format of all dates are identical, and the same format as the regional settings.

I would be grateful for any assistance,

Thanks



Posted by Damon Ostrander on January 11, 2002 9:48 AM

Hi Bob,

I'm not familiar with dsofile, but reading and writing the custom properties in VBA is pretty straightforward. You didn't mention whether you are reading them by the customproperty name or their index numbers. Also, if you delete the last custom property, does it then only read 6 of the 7 customproperties correctly? If so, it suggests the code never reads the last customproperty correctly, in which case it would be helpful to post the code or the url where it can be found.

One other thing--check to make sure it is reading the first customproperty (e.g., if the dates for the first and second customproperties were the same, it would be easy to think that the first one in the list is the first customproperty when it is actually the second). Customproperty index numbers start with 1, not 0 as with VBA arrays.

Damon