Discussion:
References to non-existant shapesheet cells
(too old to reply)
Aussie Susan
2007-04-05 05:58:02 UTC
Permalink
I have created a shape that needs to know if the page it is on has been
properly 'set up'. If the page contains a shapesheet cell
(thePage!User.Scale" in this case), then the value should be used; otherwise
a default value should be used.

I can see the FormulaExists function, and it seems to work OK within an IF()
function of the form IF(FormulaExists("thePage!User.Scale")=0,
"Value1","Value2"), but I get the "error in formula" message from from
something like:

IF(FormulaExists)"thePage!User.Scale")=0,90 mm, thePage!User.Scale)

The error highlights the 'false' part of the IF function parameter.

In other words, what I'm trying to do is use the page value if it exists,
and otherwise use the default of 90 mm.

cna this be done? If so how.

Thanks

Susan
JuneTheSecond
2007-04-05 07:12:01 UTC
Permalink
I could not see what did you mean by "Value1","Value2".
So, I replaced them by 1 and 2.
Then I put the next formula in a acttion cell, and the formula worked well,
if the user.Scale was existing.
IF(FORMULAEXISTS("thePage!User.Scale")=0,1,2)
By the way, FORMULAEXISTS function cannot see whether the cell is exist or
not.
If you wish to check the cell existence, you might use VBA and CellExists
property.
David Parker
2007-04-05 21:28:36 UTC
Permalink
Try this:

=1+ABS(NOT(ISERR(INT(INDEX(0,"ThePage!User.Scale")))))
Post by JuneTheSecond
I could not see what did you mean by "Value1","Value2".
So, I replaced them by 1 and 2.
Then I put the next formula in a acttion cell, and the formula worked well,
if the user.Scale was existing.
IF(FORMULAEXISTS("thePage!User.Scale")=0,1,2)
By the way, FORMULAEXISTS function cannot see whether the cell is exist or
not.
If you wish to check the cell existence, you might use VBA and CellExists
property.
Aussie Susan
2007-04-10 01:42:02 UTC
Permalink
David,

Thank you for the assistance. I must admit that I couldn't quite get this to
work (the INDEX function didn't seem to want to cooperate for some reason),
but I did find something interesting that circumvented the issue.

I had created the user cell on the page I was using, and had a reference to
it in my shape object. I then saved the shape object as a 'master'. Later on
I created a new Visio document and brought in my master. When I dragged my
shape master onto the new page, the user defined page cell was automatically
created.

My reading of this is that, because the page cell is created if it doesn't
exist, then I don't need to worry about the cell not existing!!!!!

Thanks

Susan
Post by David Parker
=1+ABS(NOT(ISERR(INT(INDEX(0,"ThePage!User.Scale")))))
Post by JuneTheSecond
I could not see what did you mean by "Value1","Value2".
So, I replaced them by 1 and 2.
Then I put the next formula in a acttion cell, and the formula worked well,
if the user.Scale was existing.
IF(FORMULAEXISTS("thePage!User.Scale")=0,1,2)
By the way, FORMULAEXISTS function cannot see whether the cell is exist or
not.
If you wish to check the cell existence, you might use VBA and CellExists
property.
David Parker
2007-04-12 06:46:24 UTC
Permalink
Yes, that is a trick that we often use ...... if only you had said why in
the first post :-)
Post by Aussie Susan
David,
Thank you for the assistance. I must admit that I couldn't quite get this to
work (the INDEX function didn't seem to want to cooperate for some reason),
but I did find something interesting that circumvented the issue.
I had created the user cell on the page I was using, and had a reference to
it in my shape object. I then saved the shape object as a 'master'. Later on
I created a new Visio document and brought in my master. When I dragged my
shape master onto the new page, the user defined page cell was
automatically
created.
My reading of this is that, because the page cell is created if it doesn't
exist, then I don't need to worry about the cell not existing!!!!!
Thanks
Susan
Post by David Parker
=1+ABS(NOT(ISERR(INT(INDEX(0,"ThePage!User.Scale")))))
Post by JuneTheSecond
I could not see what did you mean by "Value1","Value2".
So, I replaced them by 1 and 2.
Then I put the next formula in a acttion cell, and the formula worked well,
if the user.Scale was existing.
IF(FORMULAEXISTS("thePage!User.Scale")=0,1,2)
By the way, FORMULAEXISTS function cannot see whether the cell is exist or
not.
If you wish to check the cell existence, you might use VBA and CellExists
property.
Loading...