Cells() returning wrong cell?

P

Pista

Hello!
I have the following code>

Dim vsoPage As Visio.Page
Dim vsoShape As Visio.Shape
Dim vsoCell As Visio.Cell
Dim myXMLContent As String

Set vsoPage = ActiveDocument.Pages("Catalog List")
Set vsoShape = vsoPage.Shapes("Sheet.1")

myXMLContent = FindElementContent("<my:Title_EN>",
XML2VSDForm.SourceTextBox.text)
If vsoShape.CellExists("Prop._VisDM_Title", visSectionProp) Then
Set vsoCell = vsoShape.Cells("Prop._VisDM_Title")
vsoShape.CellsSRC(visSectionProp, vsoCell,
visCustPropsValue).FormulaForceU = "MyValue"
End If

and line vsoShape.Cells("Prop._VisDM_Title") returns wrong cell. I got 0 (I
think the first row in Prop Section) and that is wrong, I need another one.
I think I just made a simple mistake, help me out, please :)

Thank you and have a good day!
Pista
 
J

JuneTheSecond

Would you please check again the spec. for CellsSRC property.
The second atgument might have been row index in place of cell object.

Your " vsoShape.CellsSRC(visSectionProp, vsoCell,
visCustPropsValue).FormulaForceU = "MyValue" " can be replaced by
vsoCell.FormulaForceU = "MyValue"
If Myvalue is not numerical nor Visio mathematival formula, then "MyValue"
would be better to be written as """MyValue""" .
 
P

Pista

Thank you,

I realized my wrong usage of CellsSRC property.
But I got Syntax compile error by replacement you recommended to me.

I just need to place the formula ""myValue"" into the VALUE of specific Cell
in Shape Data Section. I dont know, how to modify VALUE column in a prop cell.

But my Set vsoCell = vsoShape.Cells("Prop._VisDM_Title") returns me the
wrong cell. (eg "Prop._VisDM_Subtitle" instead of "Prop._VisDM_Title").

Thank you for your patience :)
 
P

Pista

I made it! I just added pair of quotation marks > """MyValue"""
Ehm...
Not bad after a whole day of exploration :)
 

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