Get visSectionProp value without quotes?

A

AdamB

I'm using the visSectionProp to story a variety of metadata on a shape.

For example, I'll have a property called Prop.Region.

I set the formula of this to something like "southwest".

When I retrieve the property through myshape.Cells("Prop.Region") I get "0".
I would love to get "southwest" instead. In order to get "southwest" now, I
need to do a Replace(myshape.Cells("Prop.Region"),chr(34),"").

Does anyone have any ideas on how this can be accomplished? The replace
functions make the code look messy. I even tried .Result and that just
returned zero.

Am I thinking about this the wrong way?
 
A

AdamB

I think I answered my own question.

When I was setting the property, I was doing a
myshape.Cells("Prop.Region").Formula = "southwest"

Instead, I should have done myshape.Cells("Prop.Region") = "southwest" which
will set the ResultIU value.
 
A

AdamB

I guess I didn't fully resolve the issue.

It seems that I have to do what I was doing before re:Formula if I am saving
string values. I had success because the particular variable was an integer.

So for now I've made a CVStr() function that formats the string correctly
and a DVStr() function that decodes it. ugh.

Anyone have any better ideas?
 
A

AdamB

I guess the problem is more with setting the cell value without using quotes
rather than retreiving it, as there is the .ResultStr(0) function.
 

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