Excel Snake Game VBA Macro (Advanced) Part 1/2

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น • 44

  • @weihern9741
    @weihern9741 ปีที่แล้ว +3

    Didn't realize it was that easy to make snake game in vba. Brilliant teaching btw, super clear explanation

  • @sammotto7956
    @sammotto7956 ปีที่แล้ว +3

    Great... I'm learning VBA and English

  • @marcosalves1498
    @marcosalves1498 7 หลายเดือนก่อน +2

    For those who can't make the snake move, it's because the sub bindKeys isn't called when you start the game
    You can fix this by adding the sub bindKeys on the sub StartGame, and create a new button to assign the sub freeKeys so you can unbind the arrow keys

  • @claudineyribeiro518
    @claudineyribeiro518 11 หลายเดือนก่อน +2

    Hi. I'm a brazilian vba programmer who just started teaching how to use OpenGL with Excel VBA.I think your game will be much better with better graphics

  • @FloriMurati-dr2op
    @FloriMurati-dr2op 10 หลายเดือนก่อน +1

    Hey the only problem is that the snake doesn't move ive done it all the only difference it that the I changes to i and i dont think that that is the problem.Can you help me please?

    • @FloriMurati-dr2op
      @FloriMurati-dr2op 10 หลายเดือนก่อน

      I alsoo ok tried it with the code named keys in your blog

    • @ExcelMacroMania
      @ExcelMacroMania  10 หลายเดือนก่อน

      Check the post and download the file there to see the code and compare with yours: excelmacrofun.blogspot.com/2021/12/excel-snake-game.html

  • @adnanehaddad6127
    @adnanehaddad6127 2 ปีที่แล้ว +1

    did you press any botons to move the snake ?

    • @ExcelMacroMania
      @ExcelMacroMania  2 ปีที่แล้ว

      Yes, you can move the snake with the arrows in the keyboard. That's all explained in the video, we use the Application.OnKey method to link each of the arrows to the move in each direction.

    • @adnanehaddad6127
      @adnanehaddad6127 2 ปีที่แล้ว

      @@ExcelMacroMania thank 's

  • @virtualcow44
    @virtualcow44 3 หลายเดือนก่อน

    i have issue where when i clicked button Start game, my arrows do jackshit. please help

  • @souzamotasacul
    @souzamotasacul 2 ปีที่แล้ว +1

    Amazing!!! Thank you 🙏🏼

  • @DailyVideo-cc
    @DailyVideo-cc 2 ปีที่แล้ว +1

    Why do i have a yellow line word on the Sub ShowSnake () ?

    • @ExcelMacroMania
      @ExcelMacroMania  ปีที่แล้ว

      The yellow line highlights an error in the code. You can learn about errors and debugging in this video in the tutorial for beginners: th-cam.com/video/Rg-gXg8MYKc/w-d-xo.htmlsi=DRd51mkqIzTFecOJ

  • @alexazcona9015
    @alexazcona9015 ปีที่แล้ว

    It says compilation error: an ambiguous name has been detected: BindKeys. How do I solve it?

    • @ExcelMacroMania
      @ExcelMacroMania  ปีที่แล้ว +3

      You may have added 2 procedures with the same name? Maybe is BindKeys and FreeKeys, check that out. You can also download the file from the blog: excelmacrofun.blogspot.com/2021/12/excel-snake-game.html

  • @wesley4524
    @wesley4524 ปีที่แล้ว

    when pressing the start game button it say "object doesn't support this property or method"

    • @ExcelMacroMania
      @ExcelMacroMania  ปีที่แล้ว

      that's probably because you did not define the object variable, maybe miss-typed? It could also be the object is defined as something and you try to use a property/method that does not correspond to that object.

  • @DailyVideo-cc
    @DailyVideo-cc 2 ปีที่แล้ว +2

    How can i solve it?

  • @manuelrivera2503
    @manuelrivera2503 ปีที่แล้ว

    help in the code tail =Ubound (r) it does not work

    • @ExcelMacroMania
      @ExcelMacroMania  ปีที่แล้ว

      What's the error message? Make sure you declare r as dynamic array adding empty parenthesis:
      Dim r() As Integer
      It is also possible you forgot to redim when starting the game: ReDim r(4)
      Download the file to check the code in the blog article, that one works fine:
      excelmacrofun.blogspot.com/2021/12/excel-snake-game.html

  • @GoGiNim
    @GoGiNim ปีที่แล้ว

    4:23 I clicked it and it says "needs an array"

    • @GoGiNim
      @GoGiNim ปีที่แล้ว

      i made the same

    • @ExcelMacroMania
      @ExcelMacroMania  ปีที่แล้ว

      @@GoGiNim Not sure what's the error you get... check the blog article and download the file there, that should work!
      excelmacrofun.blogspot.com/2021/12/excel-snake-game.html

  • @NahomAbebe-f9k
    @NahomAbebe-f9k ปีที่แล้ว

    I faced encounter on timer module(I use window 8(bit 64)

    • @ExcelMacroMania
      @ExcelMacroMania  ปีที่แล้ว

      I tested in Win 7 and Win 10, both with Excel 32 and 64 bit, but never tried Win 8. However, I do not think there is any reason it would not work there. Where exactly do you get the error?

  • @DailyVideo-cc
    @DailyVideo-cc 2 ปีที่แล้ว +1

    Pls help me my snake doesn't move

    • @ExcelMacroMania
      @ExcelMacroMania  2 ปีที่แล้ว

      Hi there, I have just seen your comments. First, the yellow "line" that you mention highlight the code causing a run-time error. Check this other video to understand what that is and learn how to debug your code: th-cam.com/video/Rg-gXg8MYKc/w-d-xo.html
      If the snake doesn't move, that's probably connected with the timer function. Please check this post to read more about it and download the file:
      excelmacrofun.blogspot.com/2021/12/excel-snake-game.html

  • @encontrandolostmedia11
    @encontrandolostmedia11 2 ปีที่แล้ว

    I get an error that I need to put End If and my snake does not move

    • @ExcelMacroMania
      @ExcelMacroMania  2 ปีที่แล้ว

      Sounds like you forgot indeed to end some If statement. Download the file and have a look at the code to compare with yours. Here's the post: excelmacrofun.blogspot.com/2021/12/excel-snake-game.html

    • @encontrandolostmedia11
      @encontrandolostmedia11 ปีที่แล้ว

      Thank you

  • @ikeralejandrotorresserrano1571
    @ikeralejandrotorresserrano1571 ปีที่แล้ว +1

    Awesome

  • @DailyVideo-cc
    @DailyVideo-cc 2 ปีที่แล้ว +1

    I have no error encounter

  • @Esteban-ut8lv
    @Esteban-ut8lv 2 ปีที่แล้ว +1

    hey the snake does not move and I did the same

    • @ExcelMacroMania
      @ExcelMacroMania  2 ปีที่แล้ว

      Download the file and check the code to see if you are missing something here: excelmacrofun.blogspot.com/2021/12/excel-snake-game.html

    • @Esteban-ut8lv
      @Esteban-ut8lv 2 ปีที่แล้ว

      Ok

  • @IsmoiljonAbdumajidov
    @IsmoiljonAbdumajidov ปีที่แล้ว

    main reason why many people are making mistake is , this teacher also made mistake ,
    on 5:48 . i hope he will see and correct it

    • @ExcelMacroMania
      @ExcelMacroMania  ปีที่แล้ว +1

      Yes, indeed I miss-typed "moveDown" in that line of code. Please be all aware of that, otherwise you won't be able to move the snake downwards. Not easy to talk and type guys, how you understand 🙂

  • @DailyVideo-cc
    @DailyVideo-cc 2 ปีที่แล้ว

    I'm done! But why so the snake don't move?

    • @Wisss
      @Wisss 2 ปีที่แล้ว

      o

  • @up_down797
    @up_down797 ปีที่แล้ว

    snake doesn't move😭

    • @ExcelMacroMania
      @ExcelMacroMania  ปีที่แล้ว

      Try using the exact same code as in the file for download here: excelmacrofun.blogspot.com/2021/12/excel-snake-game.html