Custom Properties

N

nick blades

i have been trying to save some information to a custom properties
file using the following code

Private Sub btn_OK_Click()
Dim thisshape As Visio.Shape
Set thisshape = Visio.ActiveWindow.Selection.Item(1)
thisshape.Cells("prop.Text").Formula = ufrm_pipename.txt_pipename.Text
ufrm_pipename.Hide
End Sub

The code above lets me save data when used in other applications but
when used in this case it doesn't seem to work and gives me a error
box which says
run-time error '-2032466907(86db0425)':
#NAME?

does anyone know what this means/how to get around the problem?

Your help will be most appreciated
Nick
 
A

Al Edlund

you might consider using the 'stringtoformulaforstring' function from the
v2003sdk. something like
this.
al
dim strNewValue as string
dim vsoCell as visio.cell

strNewValue = "some text from some form"

set vsoCell = thisshape.cells("prop.text")
vsoCell.FormulaU = StringToFormulaForString(strNewValue)
 
N

nick blades

Thanks Al,
unfortunately it did not work(i'm using visio2000) but now i
understand why it doesn't work (i'm trying to input a name into a
formula cell) which is a great help.
Nick
 

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