ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to write macro to move object via if function (https://www.excelbanter.com/excel-discussion-misc-queries/72300-how-write-macro-move-object-via-if-function.html)

Ged

How to write macro to move object via if function
 
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 A1<A2 move object from here to there.

Thanks in advance

Bob Phillips

How to write macro to move object via if function
 
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)

"Ged" wrote in message
...
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 A1<A2 move object from here to there.

Thanks in advance




Dave Peterson

How to write macro to move object via if function
 
Just to clarify...

Do you mean an if condition in a worksheet formula?

Or an If statement in a subroutine?

Ged wrote:

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 A1<A2 move object from here to there.

Thanks in advance


--

Dave Peterson

Ged

How to write macro to move object via if function
 
Dave

I mean an if condition in a worksheet formula?


"Dave Peterson" wrote:

Just to clarify...

Do you mean an if condition in a worksheet formula?

Or an If statement in a subroutine?

Ged wrote:

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 A1<A2 move object from here to there.

Thanks in advance


--

Dave Peterson


Dave Peterson

How to write macro to move object via if function
 
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:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

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

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

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

Ged wrote:

Dave

I mean an if condition in a worksheet formula?

"Dave Peterson" wrote:

Just to clarify...

Do you mean an if condition in a worksheet formula?

Or an If statement in a subroutine?

Ged wrote:

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 A1<A2 move object from here to there.

Thanks in advance


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 05:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com