Adding Custom Properties in VBA 
Author Message
 Adding Custom Properties in VBA

I am adding custom properties to document shapes as well
as master stencil shapes with VBA but get an error when
trying to set the Ask property (Error: Unexpected End Of
File...which usually means incorrect or no property).
The syntax that works with several other properties is:
shape.Cells("Prop.NewProperty.Label").Formula = Chr(34)
& "New Property" & Chr(34)
and
shape.Cells("Prop.NewProperty.Type").Formula = 1

But,
shape.Cells("Prop.NewProperty.Ask").Formula = TRUE (or -1)
gets the error.

Any help would be very much appreciated.

Thanks,
Mike



Sat, 10 Jan 2004 18:37:49 GMT  
 Adding Custom Properties in VBA
You might want to try:

shape.CellsSRC(visSectionProp,visRowProp,visCustPropsAsk)

This will get you the Custom Property in the first row of the section,
to get the second replace visRowProp with visRowProp+1.  To get the
third replace it with visRowProp+2 and so on...

I hope this helps.
Kelly

Quote:

> I am adding custom properties to document shapes as well
> as master stencil shapes with VBA but get an error when
> trying to set the Ask property (Error: Unexpected End Of
> File...which usually means incorrect or no property).
> The syntax that works with several other properties is:
> shape.Cells("Prop.NewProperty.Label").Formula = Chr(34)
> & "New Property" & Chr(34)
> and
> shape.Cells("Prop.NewProperty.Type").Formula = 1

> But,
> shape.Cells("Prop.NewProperty.Ask").Formula = TRUE (or -1)
> gets the error.

> Any help would be very much appreciated.

> Thanks,
> Mike



Sun, 11 Jan 2004 01:34:12 GMT  
 Adding Custom Properties in VBA
Thanks but I just found on the MSDN website what I needed.
In the online developer help that comes with Visio 2000
under the Cells topic they make reference to Label, Prompt
etc. properties and the syntax to use them and also refer
to the Ask property. But, you actually use the Verify
property (which is not referenced anywhere in their Help
files but is on their website info) in place of the Ask
property:
shape.Cells("Prop.NewProperty.Verify").Formula = TRUE

Again, thanks for your information.

Mike

Quote:
>-----Original Message-----
>You might want to try:

>shape.CellsSRC(visSectionProp,visRowProp,visCustPropsAsk)

>This will get you the Custom Property in the first row of
the section,
>to get the second replace visRowProp with visRowProp+1.  
To get the
>third replace it with visRowProp+2 and so on...

>I hope this helps.
>Kelly


>> I am adding custom properties to document shapes as well
>> as master stencil shapes with VBA but get an error when
>> trying to set the Ask property (Error: Unexpected End Of
>> File...which usually means incorrect or no property).
>> The syntax that works with several other properties is:
>> shape.Cells("Prop.NewProperty.Label").Formula = Chr(34)
>> & "New Property" & Chr(34)
>> and
>> shape.Cells("Prop.NewProperty.Type").Formula = 1

>> But,
>> shape.Cells("Prop.NewProperty.Ask").Formula = TRUE (or -
1)
>> gets the error.

>> Any help would be very much appreciated.

>> Thanks,
>> Mike

>.



Sun, 11 Jan 2004 02:52:01 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VBA to add custom meta data properties

2. Need Help: Trouble adding a custom menu pick to a custom popup menu in VBA

3. Problems adding custom property pages

4. Writing Custom properties in VBA?

5. update to a custom field (or property) in VBA

6. how to add custom properties to folder?

7. Adding custom properties and assigning values.

8. Master 's custom properties in VBA

9. Custom Properties and VBA

10. VBA for Custom Property

11. Iterate through custom properties from VBA?

12. Reading the Custom Properties fields using VBA

 

 
Powered by phpBB® Forum Software