VBA-Changing tag values

E

Edward

Hi everybody,
Is there a way of changing tag values beside using (.Add) mthod over and
over again?

I have the following code
osld.Tags.Add "Region", "USA"
if i want to change the Region to europe it seems the only way possibile is
using the following
osld.Tags.Add "Region", "Europe"

fortunately this doesn't add a new tag ( tag.counts remain the same) , but
it changes the tag index ( newley changed tag gets the last index in the
collection)
 
E

Edward

I have only 4 tags so tag index is not a major issue , but when we have many
tags instead of loop through all of them we can just apply changes to a
specific tag ( using its index.
I also think if tags behave like built in properties ( that we can assign
new values to them) , it's much cleaner than use the same .Add method for
both creating new tags and changing them.
I was wondering if I'm missing something, and there is a better way of
changing tag values, but apparently there is none .
Thanks for clearifying
 
S

Shyam Pillai

Edward,
Is there a reason for looping thru the tags? You can retrieve the value of
the tag by name for any object.

Debug.Print oSld.Tags.item("REGION")


Regards,
Shyam Pillai

Office tips: http://skp.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top