Custom Properties---- Visio 5 Pro 
Author Message
 Custom Properties---- Visio 5 Pro

I'm new to working with Visio.

Can anyone explain to me why when I execute the following.
Set celObj = shpObj.Cells("Prop.Name")

I get the proper response as long as the value in "Name" is numeric
"200". But get "0" when I change the value to "200a"?

Thanks in advance.



Tue, 24 Sep 2002 03:00:00 GMT  
 Custom Properties---- Visio 5 Pro
David:

Could you post lengthier sample of the problem code, and also described
where it is that you see the "0"?

Graham

-----------------------------------
Graham Wideman
www.wideman-one.com

(Remove the obvious to email me)
-----------------------------------



Tue, 24 Sep 2002 03:00:00 GMT  
 Custom Properties---- Visio 5 Pro
Sorry for the short post.

Here's the entire section:

Sub ShowObjectName()
Dim celObj As Visio.Cell
Dim shpObj As Visio.Shape
Set shpObj = ActiveWindow.Selection(1)
Set celObj = shpObj.Cells("Prop.Row_1")
MsgBox "This is the object you selected.", , celObj

End Sub

When this completes the value of "celobj" is ZERO if the value in
Prop.Row_1 is anything but a numeric.

Quote:
-----Original Message-----

I'm new to working with Visio.

Can anyone explain to me why when I execute the following.
Set celObj = shpObj.Cells("Prop.Name")

I get the proper response as long as the value in "Name" is numeric
"200". But get "0" when I change the value to "200a"?

Thanks in advance.



Tue, 24 Sep 2002 03:00:00 GMT  
 Custom Properties---- Visio 5 Pro
David:

Quote:
> MsgBox "This is the object you selected.", , celObj

I suspect that you are getting hosed, or at least led astray, by the
default property behavior of Cell.  To hep troubleshoot, try:

  FormulaStr = celObj.Formula
  ValueStr   = celObj.Value

  ... and then send these to MsgBox or Debug.Print, and see what you
get.

Graham

-----------------------------------
Graham Wideman
www.wideman-one.com

(Remove the obvious to email me)
-----------------------------------



Tue, 24 Sep 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Visio 2K Custom Properties Drop-Down

2. Custom Property changes in Custom Outlook Form

3. Visio Installation regular or pro license?

4. Properties Property for a Custom Class

5. Custom DB properties and Document Properties (A97)

6. Custom visio toolbar with combobox

7. Custom visio toolbar with combobox

8. More Custom Menu Problems in Visio 2002

9. custom windows in my Visio solution

10. Custom menus in Visio

11. Custom Menu in Visio 2002

 

 
Powered by phpBB® Forum Software