for the people who have a problem in dragging the object, try changing the slide number in the code
@valsevilla42036 жыл бұрын
Hmmm... right at 16:20 your screen changes and the position and position_end text is appearing. Mine isn't. I've followed every step precisely. Any idea what might be going wrong? Thank you for this video. I really want to figure this out.
@Awayzo6 жыл бұрын
Yes, that was a glitch, however, there are no missing steps. Make sure you select the shape first, then go to insert, action... If you are getting an error it means you misspelled some code or if it just is not working, it could mean that you may not have added or changed the code. Remember VBA is case sensitive.
@valsevilla42036 жыл бұрын
Thank you for replying. Could I maybe email you the file and see if you can find what I did or didn't change right? I don't have experience yet with VBA, but I regularly use other coding languages. To make sure I wasn't missing anything, I used copy/paste. I included quotes. I'm using my own images, of course, but I kept the names the same as yours (until I learn VBA myself). So, I have a ball and a box, but they are named "square" and "square_end".
@Awayzo6 жыл бұрын
What I can do is give you this link to the finished code. You can compare it to your own or just paste it into your project after deleting your code:docs.google.com/document/d/1sNqpYhLDd1971ZJXtnoA-b96BDkBG4NwjxMnolSzJ2k/edit?usp=sharing
@valsevilla42036 жыл бұрын
Malik Stalbert Thank you.
@vinzfelix7694 жыл бұрын
Hi Malik! Very good video! Just a question please. I have gone back to the video several times to make sure I follow it step-by-step but the issue I have is it doesn't seem to even allow me to 'Drag' the Image (when in Presentation F5 mode) I added the DragandDrop macro to, or any object I tried for this matter. I am obviously doing something wrong but can you help me identify the source?
@insiyahtinwala28434 жыл бұрын
I went through part 2 as well, it works somewhat. I want to know why is the timer necessary? Can this be made by just drag and drop to target and if doesn't hit goes back? The timer and position seems unnecessary but I'm not a coder just curious.
@martinvarsano4 жыл бұрын
Hi! One question: In your code you are referring to a shape called "sqrBlack", but you named the black square "square_end", so where Powerpoint is looking for that name?
@jasonbarrant16215 жыл бұрын
Hi Malik, just did all the steps and run macro/drop and drag is selected in the actions box but can't move shapes or see countdown - is there something I am supposed to do to finish with the module box, once all the changes have been made to the code, to save the changes perhaps?
@franklymacaraeg68065 жыл бұрын
same here..
@canaldomirazimoficial Жыл бұрын
hello. First I want to thank you for your immense help. I'm from Brazil, and maybe that's why I didn't understand something. I would like to know if I can keep user32, which you use. because the entire second paragraph, in which you use it, is in red. where did you get this user32 from...
@SugarplumFlowers4 жыл бұрын
I really appreciate this tutorial but having been thrown into creating online classes ....all of this this is a bit much....I wish Microsoft teams just integrated this into create Assignments options with a few templates and upload choices for your own pictures .....anyways I will give this a try
@MathWitMsJ3 жыл бұрын
Are there any particular settings a Mac user would need in order to run a presentation with macros? Iv created a drag and drop activity using ur tutorial and other snippets of code (to add sound and reset my slides). I use a windows laptop but I want to make sure it will also work on a Mac.
@Awayzo3 жыл бұрын
No, it will not. The only way to do it is to run Windows on Mac.
@Esclarecidos5 жыл бұрын
Do you know how to control a video in a slide with buttons? I inserted some bookmarks on the video, and I want the buttons to start playing the video at bookmarks times. For example, button 3 starts bookmark 3, button 4 starts bookmark 4, etc. I couldn't find out a way to do that using normal Powerpoint actions. Maybe with VBA it is possible. What do you think?
@nurkhalidakhalid88246 жыл бұрын
thanks a lot for this. Just wondering , if I change the square shape to arrow shape, do I need to change certain area in the codes? for example sqrBlack to something else? really cool if you can answer this since I have no background in programming language.
@Awayzo6 жыл бұрын
No you do not, however you do need to change the name of the shape to what is in the code
@edithlachi87274 жыл бұрын
Thank for your video. Now, I can improve my slides for my classes.
@Pythogoras570BC4 жыл бұрын
Why everybody can see the link to download the code and I can't see it? Low IQ? Any how, some help would be greatly appreciated Thanks in advance
@thepotatolizerd33 Жыл бұрын
it’s in the description
@klausczich96418 ай бұрын
While dragging the shape moves (jumps!) extremely slowly (PowerPoint 2021 on Win10 Pro, powerful i7 laptop...) I have tested it on several laptops And if DropInSeconds = 0 the shape only jumps once at a click Why?
@arvinlaraya63375 жыл бұрын
countdown number also appears on the dragged box, why is that happening? I rechecked twice if I followed it precisely.
@Fr3PO43 жыл бұрын
In the provided code there is a line that says " 'Comment out the next line if you do NOT want to show the countdown text within the shape". This is exactly what you've been looking for.
@KENTAPOCATE4 жыл бұрын
not working on my presentation...
@ThuTran-im5xn2 жыл бұрын
How can I do with dragging words and dropping into shapes? Can I still use the macro link you sent?
@Awayzo2 жыл бұрын
I would create a shape and remove teh background color and the border, then add the Text. This would allow you to drag the text.
@thepotatolizerd33 Жыл бұрын
Greetings, Malik! Is there a way I could make PowerPoint switch slides once the box is dropped on the other box?
@Awayzo Жыл бұрын
Yes, you just have to create a slide in code, then load it.
@loretacordero40223 ай бұрын
Hello, this could be late but does it run on latest version of MS Powerpoint?
@raulgarcia87465 жыл бұрын
Hi, what can i do to make shapes draggable but not with time limit??
@Awayzo5 жыл бұрын
To simply make it draggable regardless; you would remove the if statement "If Timer > StartTime + DragInSeconds" However, you will need to replace it with a click event to stop the dragging. That is of course if you want it to stop dragging. If you do not need it to stop dragging, then only replace the drageMode variable to true in the if statement and it will drag as long as the application is running.
@raulgarcia87465 жыл бұрын
@@Awayzo thanks a lot...
@RR-tq2ee3 жыл бұрын
hey did u manage to figure it out? i know im probably too late xD
@marcgilbation50632 жыл бұрын
Hello, I was able to enable the drag and drop function However. I have issue with the timer. Why is that the selected shape that i am dragging has a timer as well? How to remove it? Hoping to have an answer from you :(.
@Awayzo2 жыл бұрын
Becasue you have them grouped more than not
@stephanieignas3 жыл бұрын
Will it still work even though I have other slides in the same Powerpoint Presentation?
@ВалерияЮдина-о5и3 жыл бұрын
Hi. Nice video and explanation, but I have a problem. I cannot move my colored figures. So when I switch on the presentation by pressing f5 I cannot actually drag any colored figure, as you do in the video. Do you have any ideas or probably recommendations? I will be really grateful!
@Awayzo3 жыл бұрын
Keep in mind that PowerPoint recognizes fills, shapes, and lines separately. It could be that another shape has an invisible width and height that is covering up what you want to select.
@RR-tq2ee3 жыл бұрын
try to press the shape first and then move your mouse.
@elizabethpayawal64384 жыл бұрын
Can you help me? I tried to follow everything you mentioned in the video but as I reach the last part, wherein I need to click the "Run_macro" in Action button, it's not enabled. The thing enabled only are the "None", "Hyperlink to" and "Run program", "Run macro" is disabled. I cannot apply the action drag and drop. Can you help me solve this?
@nabilasalsabila85744 жыл бұрын
Elizabeth Payawal file>option>trust setting>macro setting>enable (i forgot the complete sentences but try the third option)>ok
@nurhidayahmostaffa40715 жыл бұрын
Does this codes valid for images? Not shape . I’ve try using the codes to create mix and match pictures but it’s seems not working . Please reply back.🙏🏼
@Awayzo5 жыл бұрын
Yes. You would fill the rectangle with an image and name the shape as it relates to the image.
@nurhidayahmostaffa40715 жыл бұрын
Malik Stalbert okay thank youuuu so much for the info
@marlontayag56832 жыл бұрын
Hello, Malik. Great Video. I just want to ask what code to remove if I would not be using the timer. Thank you.
@Awayzo Жыл бұрын
Make the time 0
@deraldreynolds32942 жыл бұрын
Thank you for the vid! I've followed the instruction to the T however, in VBA the text between "#Else Public .... etc #End" If is red. Does that mean it won't work? How can I fix this, Thank you for your time!
@deraldreynolds32942 жыл бұрын
Says the following "Compile error: The code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with the PtrSafe attribute."
@deraldreynolds32942 жыл бұрын
Also, does this work the same for MAC users? :)
@Awayzo2 жыл бұрын
Yes, you have to use PtrSafe to tell VBA that the code is safe for 64bit. PtrSafe. The PtrSafe keyword asserts that a Declare statement is safe to run in 64-bit versions of Office. docs.microsoft.com/en-us/office/vba/language/concepts/getting-started/64-bit-visual-basic-for-applications-overview
@Awayzo2 жыл бұрын
Yes, but as a sandbox with some restrictions. :docs.microsoft.com/en-us/office/vba/api/overview/office-mac
@travelbugsally196 жыл бұрын
These tips are amazing! Thank you. I am working on both a PC and a Mac for the same interactive powerpoint. If I do the commands on a PC (as per your examples) will they automatically do the same on my Mac?
@Awayzo6 жыл бұрын
Yes, it should work. However, any active-x controls you use in a project will not work. There has been an update to the VBA editor recently so I would suggest testing it before presenting it.
@sheridanmillichip24475 жыл бұрын
Hi, I was just wondering, if I could use the drag and drop on multiple slides in one presentation. If so how do I change the VBA to make that work, please.
@Awayzo5 жыл бұрын
Yes, you can. You just have to place the code as a class by itself, outside the slide's class structure.
@sheridanmillichip24475 жыл бұрын
@@Awayzo I really don't understand what that means, could you please explain that in another way?
@Awayzo5 жыл бұрын
All the code we write in VBA exist in a file. The file is seen as a class in VBA. You would have to create a new class aside from the original one we made and place your code there.
@anugrey95873 жыл бұрын
GREETINGS! I WANT TO DO 'FILL IN THE GAPS ACTIVITY' THROUGH DRAG AND DROP MACROS. AS YOU KNOW THERE IS ONE FILL AND OPTIONS ARE MORE . SO I NEED TO KNOW HOW TO APPLY DRAP AND DROP IN THIS CASE. THANKYOU
@Awayzo3 жыл бұрын
Oh, I get it. That is a great idea. I will look into it. If I have this correct, is it like a paint in the area game?
@laurarolon69795 жыл бұрын
Hi, I copied you compleated code and added the shapes but I can't get the macro to run. I enabled the macros on Powerpoint. Can you help me?
@Awayzo5 жыл бұрын
There is not much I can do. The video is complete and the code works. I would suggest checking for misspellings or extra spaces. VBA is very particular and the smallest mistake will prevent the entire application from working.
@CoeyDien6 жыл бұрын
thanks so much for these empowering tuts... but will these code work for powerpoint 2010 vba?
@Awayzo6 жыл бұрын
VBA has not changed, so if 2010 has the same components I am referencing, yes.
@Awayzo6 жыл бұрын
You also asked about your version, it is possible because Office 2013 and Office 2016 includes VBA 7.1 while Office 2010 includes VBA 7.0. The code I am using, however, should work on both versions. Whenever I am doing these videos, I am doing them in one shot to make sure whatever I am doing it will work for you as it does for me.
@anugrey95873 жыл бұрын
GREETINGS ! COULD YOU KINDLY EXPLAIN DRAG AND DROP MACROS WITH SOME EXAMPLE LIKE FILL IN THE GAPS. THANKYOU
@Awayzo3 жыл бұрын
Do you mean...like create an image with gaps and the user has to fill them in?
@MsHuyenAVchannel2 жыл бұрын
@@Awayzo He may mean that students choose the word/ phrase to fill in the blank of a sentence.
@neishahazel65282 жыл бұрын
Hi. I have tried the code on numerous occasions and I can't get it to work. Can I have some assistance, please?
@Awayzo2 жыл бұрын
Normally, if you cannot get it to work, it is due to errors with capitals that should be lower case and vice versa. In some cases you can also check for naming inconsistencies.
@marcusbivines55626 жыл бұрын
Great Job!
@Awayzo6 жыл бұрын
Thanks for watching...
@gustavox91084 жыл бұрын
Hello, I am trying to learn all this stuff -- what does this part of the project file do? ty!#If VBA7 Then Public Declare PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey As LongPtr) As Integer Public Declare PtrSafe Function WindowFromPoint Lib "user32" (ByVal xPoint As LongPtr, ByVal yPoint As LongPtr) As LongPtr Public Declare PtrSafe Function GetWindowRect Lib "user32" (ByVal hwnd As LongPtr, lpRect As RECT) As LongPtr Public Declare PtrSafe Function GetCursorPos Lib "user32" (lpPoint As PointAPI) As LongPtr Public Declare PtrSafe Function GetSystemMetrics Lib "user32" (ByVal nIndex As LongPtr) As LongPtr #Else Public Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer Public Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long Public Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long Public Declare Function GetCursorPos Lib "user32" (lpPoint As PointAPI) As Long Public Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long #End If
@RR-tq2ee3 жыл бұрын
i appreciate what you doing but hell ive been testing and redoing this vba macro script like numerous times and still not be able to drag the shapes.. i followed your steps like using images, the label or name and everything but still no luck of creating the same idea.. pls help me out
@RR-tq2ee3 жыл бұрын
nvm.. i found out why it didnt move.. it because i dragged immediately where i need to click first then drag. However the window "Great Job!" didnt open up everytime i put the shapes on top of the black square
@erinsnyder80484 жыл бұрын
I can't find the project file in Patron
@cecicvn35892 жыл бұрын
Is it possible to make more slides in the same PowerPoint?
@Awayzo2 жыл бұрын
Yes, you have to make sure to select the correct slide in code.
@altybaalwadod19923 жыл бұрын
hello could you help me i did it alot of times but when i click with mouse on the shape it is not moving i donot why or where the mistake macro option works with me but when i try to move the shape it is not moving
@Awayzo3 жыл бұрын
A few people ran into this issue. It is difficult for me to reproduce unless I had your project file.
@RR-tq2ee3 жыл бұрын
try to press the shape first and then move your mouse.
@njbenoza30384 жыл бұрын
Good day.. good thing I have seen this video and thanks for this. I just want to ask something. I have unlicensed PowerPoint installed in my laptop, could it be possible to save this enabled macro ppt presentation? How? Thanks for any feedback.
@Awayzo3 жыл бұрын
Yes, you can
@wahyudik23070533 жыл бұрын
Sorry Malik, these script cant work in windows 64-bit can you give any solution?
@MoezRekik4 жыл бұрын
Hi, you are the only one doing drug and drop exercise. Well done. Can you tell me how to have a correspondence between a text and an image instead of A and a. Thank you
@Awayzo3 жыл бұрын
So many people have been asking about this. I will do a video explaining the process. Thank you for watching. It is just a matter of connecting the text and image to the same variable.
@MoezRekik3 жыл бұрын
@@Awayzo thank you. We wait your video
@MsHuyenAVchannel2 жыл бұрын
@@MoezRekik Create Drag and Drop Activities on Pp and you can move text/ image/ any objects in present mode kzbin.info/www/bejne/Y2jKn6CIrdOnm6M
@MoezRekik2 жыл бұрын
@@MsHuyenAVchannel Cảm ơn bạn rất nhiều về hướng dẫn.
@MsHuyenAVchannel2 жыл бұрын
@@MoezRekik from Vietnam, hello guys :)
@كيمياءهادئة6 жыл бұрын
Many thanks for you.You are the best.
@Awayzo6 жыл бұрын
Thank you for watching...
@marcoscerpa28765 жыл бұрын
Gran trabajo, pero tengo una pregunta, Como hacerlo sin temporizador?????????
@Awayzo5 жыл бұрын
Haz que el temporizador cuente 0
@hats_off91156 жыл бұрын
what if i want to add more shapes?
@Awayzo6 жыл бұрын
Make sure you name the shape then create another ActivePresentation.Slide(1).Shapes (Shape name here) declaration
@hats_off91156 жыл бұрын
@@Awayzo thx
@furtasticpawsadventures5 жыл бұрын
Aha! It works! I'm done with the part 1.
@prettyxtinferrera68915 жыл бұрын
Where is the code?
@DeenQuery4 жыл бұрын
Great video 👌 thanks
@karmsrunestone4 жыл бұрын
You ever considered leaving the original comments in the source code from code you steal from another developer?
@Awayzo3 жыл бұрын
Make sure to save as Macro enable. If you do not, it will not save the code.
@ismailj.73026 жыл бұрын
Lot of thanks bro, it works.. btw how i could a multiple dragNdrop which varies end positions? i ve tried it but it doesnt turn out..plz help me
@Awayzo6 жыл бұрын
By multiple, do you mean 2 items at one time?
@ismailj.73026 жыл бұрын
for instance i have 5 items then there will be also 5 end positions..
@Awayzo6 жыл бұрын
You would simply change the code to add a limit to the last selection. So instead of second selection being checked, it would be the 5th in VBA. This actually sounds like an interesting thing to try. I will make a video in the future of this if you like.
@Awayzo6 жыл бұрын
I think I understand. Did you watch part 2 because I address this?
@ismailj.73026 жыл бұрын
yeah i knew it
@roboj22364 жыл бұрын
not working .. something missing I did it 4 times step by step
@orangepants53586 жыл бұрын
hey can u help me idk why but is not working for me and i followed the steps closely so is it cuz of my version?
@Awayzo6 жыл бұрын
Make sure that your security setting allows the script to run.
@orangepants53586 жыл бұрын
@@Awayzo already done that
@Awayzo6 жыл бұрын
@@orangepants5358 What I can tell you from helping many people one of two issues could be the problem... 1. Misspellings or missing quotes/parentheses in the code. This is hard to find because VBA doesn't really give you an error message for all errors. You would have to rake over the code and make sure. 2) Naming the shapes one way and trying to access the shapes in code another way. You also asked about your version, it is possible because Office 2013 and Office 2016 includes VBA 7.1 while Office 2010 includes VBA 7.0. So your version could be an issue. The code I am using, however, should work on both versions. Whenever I am doing these videos, I am doing them in one shot to make sure whatever I am doing it will work for you as it does for me.
@orangepants53586 жыл бұрын
thank you this did helped me and i saw a little dot that while writing wasnt in my vision and now its working properly , and my school project is ready.thank u again
@Awayzo6 жыл бұрын
@@orangepants5358 No problem. Thanks for the update.
@rahoomyes89924 жыл бұрын
Where is the part 2 ?
@Awayzo3 жыл бұрын
kzbin.info/www/bejne/fn_MmmeVdr6GpZI
@alexneves78095 жыл бұрын
I don't know what I've done wrong. I did it and it all worked but I didn't save it so just did it again and again but I can't get it to work. Help!
@Awayzo5 жыл бұрын
what part is not working? You have to make sure you do it one thing at a time and test it as you go.
@alexneves78095 жыл бұрын
@@Awayzo I managed to get it to work, thanks. However I do have a question. I'm creating an online course and I'm trying to create a drag and drop quiz. Is there a simple way I can lock correct answers in PowerPoint? or is there somewhere I can find a template?
@Awayzo5 жыл бұрын
@@alexneves7809 When you say lock; What exactly do you mean. Are you saying that you do not want the answers accessable by the user?
@alexneves78095 жыл бұрын
@@Awayzo no, lock is maybe the wrong word. I want, for example, to have drag and drop where only the correct answer can be dropped into the destination, (like in your example the red box into the black box) and no other, or that it would state if it is correct or wrong. What part of your given code is needed? What should I change? or do I need a completely different code? :-)
@Awayzo5 жыл бұрын
@@alexneves7809 What I would do to adjust what we currently have to fit your specifications, is to make all the other "answers" into images with not code attached and only attach the code to the active image. When the correct one is dragged and dropped, I would then advance the user to another slide that looks the same but with another object as teh answer and no other options. You would be using multiple slides, but this would be the easiest way.
@marcgilbation50632 жыл бұрын
Hello, I am your new subscriber. Been reading and watching tutorial videos about VBA in PPT. I am so grateful that i found a tutorial video for Drag and Drop function. Thank You so much. Hope to see more videos from you. I have one question....what will i do if i only want the drag and drop function and not using the timer? What should i do?
@Awayzo2 жыл бұрын
You can make the timer = 0 sec
@prettyxtinferrera68915 жыл бұрын
Where is the code link?
@alecarmstrong75384 жыл бұрын
Hi - I think I have worked out how to improve your code. Please communicate with me if you would like more information.
@kaustubhkarva95654 жыл бұрын
Can u please share code for 64 bit users please
@clairedouglas32693 жыл бұрын
Hi, I’m trying to use this to create a test for my pupils. When I got to Insert>Action> Run Macro is not enabled. I tried to enable using the Trust Centre and enabling all macros but it’s still not enabled and faded out. Thanks
@rocio29173 жыл бұрын
Is your screen enlarged? If the screen is minimized it might not show the 'action' option. The shape also needs to be selected.
@judelbeltran22302 жыл бұрын
Still the same I tried a lot of times also. Did you already find a solution to enable macro? @claire douglas?
@ItzWolfyZZZ5 жыл бұрын
The code is just for 32 bits users? :[
@umairm.56622 жыл бұрын
You;re awesome
@redeemz75315 жыл бұрын
It didnt work for me :(
@progamer-2053 ай бұрын
this guy is insane i made a game and it realy works hahahahahahaha thank you malik sir 😁😁😁😁😁😁😁😁😁😁
@CikguSultani4 жыл бұрын
thanks
@SooJiYan4 жыл бұрын
is not working >.
@AlekayLopez Жыл бұрын
Is the countdown mandatory?
@Awayzo Жыл бұрын
No
@demy78803 жыл бұрын
It doesn't work :(
@MsHuyenAVchannel2 жыл бұрын
have a look at this video about making drag and drop game with Pp kzbin.info/www/bejne/Y2jKn6CIrdOnm6M
@ma.jennecilblanco32026 жыл бұрын
I followed the steps properly but the message box isn't working. Thanks
@Awayzo6 жыл бұрын
It means you missed something...probably misspelled or an extra space somewhere
@francolescano52565 жыл бұрын
Chale no sé inglés :'v
@am2320LG6 ай бұрын
An intro to ClassPoint for Drag and Drop instructions stated NO VBMs ("drag and drop objects in PowerPoint without Macros, VBA coding, or animations!") but your tutorial is all about VBMs. I'm not a coder and following your instructions was not easy (pace was fast) and those codes (ugg). 😵💫