Macro & Yes/No Flip an Object?

K

Ken

Excel 2000 ... I have an "Object Arrow" that works similar
to a hand on a clock. I am trying to move the arrow with
recorded Macros, but depending upon where arrow is going
to/from I find the need to sometimes "Flip" the Object ...
Since the to/from is random ... I would like a little
YES/NO Macro instruction to insert in my recorded code ...
Macro would basically say ...

If Object position OK ... Select YES ... Move on (skipping
the "Flip" routine)

If Object Position NOT OK ... Select NO ... Move on
(activating the "Flip" routine).

FYI ... Recorded instruction I now have for "Flip" is:

Selection.ShapeRange.Flip msoFlipHorizontal

Thanks ... Kha
 
J

Jonathan Rynd

I would like a little
YES/NO Macro instruction to insert in my recorded code ...

That would be If/Then. It works like this:

if {condition} then
thing to do if condition is true
else
thing to do if condition is false
end if

It looks like you want {condition} to be "Object position OK"
thing to do if condition is true = nothing (leave it blank)
thing to do if condition is false = Selection.ShapeRange.Flip
msoFlipHorizontal
 

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