VBA - Microsoft Excel Animation - Moving a Shape or Object Programatically

preview_player
Показать описание
This video shows how to move a Shape or Object Programatically in Microsoft Excel 2010 VBA.

Handy Excel Resources

As an Amazon Associate, I earn from qualifying purchases. Product prices and availability are subject to change.
Рекомендации по теме
Комментарии
Автор

timeout (5)
megbox (test)

rep_count = 0

Do
DoEvents

rep_count = rep_count + 1

= rep_count
= rep_count
= rep_count
= rep_count
= rep_count
timeout(0.01)

Loop Intil rep_count = 300

timeout (duration_ms As Double)
Start_time = Timer
Do
DoEvents
Loop Until (Timer - Start_Time) 3= duration_ms

formfiledata
Автор

Alex, I literally searched for a few hours yesterday trying to find a good timer. Both the Sleep and Application.Wait methods were freezing my loops and crashing Excel. I found this video to work with shapes, and here you have the exact timer I needed. I've already tried it out and it succeeds where the other two failed.

You, my friend, are an Excel Jedi.

sully
Автор

Clever stuff. Do you have a video on how to fine rotate .1 or even less not the default 1 to straighten photos in Powerpoint 2007.

stevebayliss
Автор

Great!!!. After I watch this video, I planned to do my budget control (budget vs actual). When we entering actual data shape should reflect in shape. I will try first, then I want to discuss with you regarding...

TheJanagan
Автор

Is there a word or code ActiveShape like the well known ActiveCell?
I want to know the name of a selected shape without looking at the namebox using the vb code or macro. Please guide me. Thanks.

arielzabatecuizon
Автор

Dear can you help me to return shape object from selection ( group of objects or image after delete background)

yasirqazi
Автор

Great video tutorial! If you're still out there, I was wondering if this type of animation is possible using images on a userform??

antoniodesousa
Автор

I need to manipulate two shape (arrows), one up (green) and one down (red) with a macro according to a cell having either a positive or negative number value. How to do this please?

ScubaGuy
Автор

hi is there any way to manipulate 2 images at once? Because I need the other image starting from and going in the opposite direction. So basically one image has to go horizontally left, the other horizontally right. Thanks. :)

mcGenie
Автор

Alex,

Great tutorial! I tried following it exactly, but I keep getting the error "The item with the specified name wasn't found." I have double checked all of my code, tried manually changing the smiley face name and updating my code accordingly, but nothing is working. Any ideas? (I am using Excel 2010).

coltoncauthen
Автор

Thanks for the video.  I have a question.  The first few times you ran the macro, the object was selected as it was moving.  (It is inscribed in a square.) The last few times you ran it, the object was not selected as it was moving.  How do I prevent an object from being selected as it moves?

Generatorman
Автор

Hi Alex, thanks for such fantastic video. im trying to write a macro to make a shape move vertically downward in a column, like its falling down in the excel. i have tried this with your macro. im only able to move the object horizontally from left to right but i want to make it move down vertically from the top.
Exactly saying i need to move the smiley from row1 to row 20 in column B1.
im just a beginner with macros. Can u help me on this alex :) thanks in advance.

rajaprabhas
Автор

hi Alex! thanks for great vid. Im trying to animate a slow color sweep on one of my shapes = x+1, till it reaches 24 and loops until repcount 24.. but its all happening so fast ( blink of an eye). sleep =1200  isn't working? any hints? thanks in advance.

jetpaq
Автор

Thanks Alex!
Has anyone been successful getting the object to move faster? I've tried changing some of the variables, but it still moves very slowly.

demetriusoatis
Автор

Hi there, do you know if you can make the animation go faster than 0.01 seconds? I tried with 0.001 and 0.0001 but it didn't seem to have any effect.

guillaumewiatr
Автор

I found if you change the rep_count to a higher number it goes faster.

MitchWilson
Автор

Please how to make the shape move faster?
Someone help me please

kingimad
Автор

Can i please have the code to move it in a straight line?

peepeeraymond
Автор

Hi I just subscribed this is brilliant but I cant read the typing from the video my version above does not work...can you please paste the data or email it to me at privateplacement2 at yahoo com? I dont know vba or html Thanks a Million

formfiledata
join shbcf.ru