close

All
I am trying to write a macro that will move an auto shape depending upon the
results of an IF condition. i.e. if A1lt;A2 move object from here to there.

Thanks in advance

Can't be done. User defined functions can return a result, they can
manipulate objects.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

quot;Gedquot; gt; wrote in message
...
gt; All
gt; I am trying to write a macro that will move an auto shape depending upon
the
gt; results of an IF condition. i.e. if A1lt;A2 move object from here to there.
gt;
gt; Thanks in advance
Just to clarify...

Do you mean an if condition in a worksheet formula?

Or an If statement in a subroutine?

Ged wrote:
gt;
gt; All
gt; I am trying to write a macro that will move an auto shape depending upon the
gt; results of an IF condition. i.e. if A1lt;A2 move object from here to there.
gt;
gt; Thanks in advance

--

Dave Peterson

Dave

I mean an if condition in a worksheet formula?quot;Dave Petersonquot; wrote:

gt; Just to clarify...
gt;
gt; Do you mean an if condition in a worksheet formula?
gt;
gt; Or an If statement in a subroutine?
gt;
gt; Ged wrote:
gt; gt;
gt; gt; All
gt; gt; I am trying to write a macro that will move an auto shape depending upon the
gt; gt; results of an IF condition. i.e. if A1lt;A2 move object from here to there.
gt; gt;
gt; gt; Thanks in advance
gt;
gt; --
gt;
gt; Dave Peterson
gt;

See Bob's reply.

You may be able to use some sort of worksheet event (worksheet_calculate) to do
what you want.

If you're new to macros, you may want to read David McRitchie's intro at:
www.mvps.org/dmcritchie/excel/getstarted.htm

If you want to read more about these kinds of events:

Chip Pearson's site:
www.cpearson.com/excel/events.htm

David McRitchie's site:
www.mvps.org/dmcritchie/excel/event.htm

Ged wrote:
gt;
gt; Dave
gt;
gt; I mean an if condition in a worksheet formula?
gt;
gt; quot;Dave Petersonquot; wrote:
gt;
gt; gt; Just to clarify...
gt; gt;
gt; gt; Do you mean an if condition in a worksheet formula?
gt; gt;
gt; gt; Or an If statement in a subroutine?
gt; gt;
gt; gt; Ged wrote:
gt; gt; gt;
gt; gt; gt; All
gt; gt; gt; I am trying to write a macro that will move an auto shape depending upon the
gt; gt; gt; results of an IF condition. i.e. if A1lt;A2 move object from here to there.
gt; gt; gt;
gt; gt; gt; Thanks in advance
gt; gt;
gt; gt; --
gt; gt;
gt; gt; Dave Peterson
gt; gt;

--

Dave Peterson

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()