Excel VBA Introduction Part 19 - Error Handling (On Error, Resume, GoTo)

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ย. 2024

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

  • @rodrigocouto9463
    @rodrigocouto9463 9 ปีที่แล้ว +27

    I have been studying VBA literally from your videos. I have bought books to study, but through your videos is much easier and faster. Thank you for the videos. I'm grateful

  • @Kingco245
    @Kingco245 8 หลายเดือนก่อน +1

    These videos are a treasure trove. After many years of producing them, the teaching techniques are still top-notch and make VBA easier to digest. I run to these playlists each time VBA documentation starts getting too abstract to wrap my head around. I'm super thankful for not dropping the ball when the videos still had low visibility ❤

    • @WiseOwlTutorials
      @WiseOwlTutorials  8 หลายเดือนก่อน +1

      Really happy to hear that you've found the videos useful for so long! Thanks for watching and for taking the time to write a comment!

    • @Kingco245
      @Kingco245 8 หลายเดือนก่อน +1

      You are welcome. Do you have an Excel community I can join? I want to be around people who are passionate about Excel

    • @WiseOwlTutorials
      @WiseOwlTutorials  8 หลายเดือนก่อน

      @@Kingco245 Hi! We don't have a Wise Owl Excel community but there are plenty of others out there! You could start here techcommunity.microsoft.com/t5/excel/welcome-to-the-excel-community/m-p/7715
      I hope it helps!

  • @anishkesar2503
    @anishkesar2503 7 ปีที่แล้ว

    You teach as if the viewers knows nothing which I think is the best part in your videos... GREAT

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

    Best best vba series on the Internet.... Wish i found it earlier.... Thanks alot for sharing knowledge

  • @nazefali3699
    @nazefali3699 10 ปีที่แล้ว +17

    Hi Andrew, Welcome back on vba videos. The best one online.
    Teaching is a gift and you have it.
    Thank you so much.

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

    Love your videos Andy! Thank you for putting in the time and effort for making these and especially publishing them for FREE for us to consume and learn. Your efforts definitely don't go unnoticed as with every video in this playlist!

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

      You're welcome Qasim! Happy to hear you're finding the videos useful and thanks for watching!

  • @djram1072
    @djram1072 7 ปีที่แล้ว +5

    Dear Mr. Andrew. No words can thank you enough. What a wonderful delivery of knowledge sharing You are doing. I have been able to create an excellent maintenance management system using excel vba by seeing your tutorials. I am a mechanical engineer and developing a system was need of the hour. Once again thank you.

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

    I’ve searched online for a while looking for explanations that are clear and comprehensive and finally I found them in this video. Thank you for publishing this, this has really helped me write better code for my projects!

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

      Happy to hear that, Natalie! Thanks for watching and for taking the time to add a comment!

  • @ELDRAGONMESSI1018
    @ELDRAGONMESSI1018 4 ปีที่แล้ว

    out of all the youtube channels on vba, you are the best for helping beginners understand the concepts in a way that can be used right after the video is over! thank you for being great! :)

  • @adityabholanekar6426
    @adityabholanekar6426 8 ปีที่แล้ว +2

    You are GOD of the universe Andrew Gould

  • @ph6560
    @ph6560 10 ปีที่แล้ว

    Hi Andrew!
    Just wanted to give you huge props for your excellent videos.
    Without exaggerating your videos are some of the best educational videos I've watched. Every time a question comes up when watching your videos the second after you answer it. Very well thought through and pedagogical clips! I'll certainly continue to explore and learn VBA further as you post your clips.It's plain fun learning VBA with Andrew behind the mic! :)

  • @esraonel4853
    @esraonel4853 7 ปีที่แล้ว

    Thank you Andrew! I think thanks to you I'll pass my computer science exam.
    Sooo grateful.

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

    Thanks for the crystal clear explanation!!

    • @WiseOwlTutorials
      @WiseOwlTutorials  4 ปีที่แล้ว

      You're welcome, David. Thanks for watching!

  • @VishnuRNairvishnurnair
    @VishnuRNairvishnurnair 10 ปีที่แล้ว +2

    Yes. I found the real VB teacher. Thanks for this video, The presentations in this video was awesome. Now i can handle different errors in VB.
    Thanks
    New WiseOwlTutorials Subscriber :)

  • @Tat-cx1lr
    @Tat-cx1lr 7 ปีที่แล้ว

    Bonjour merci encore. Je suis à la 19ème vidéo. Vous êtes un vrai pédagogue. Continuez...

  • @johnnydbt
    @johnnydbt 5 ปีที่แล้ว

    Omg.... I tried to find an answer for this for about 30mins... You are a legend.

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

    Sheet42: the answer to life, the universe, and everything

  • @Tat-cx1lr
    @Tat-cx1lr 4 ปีที่แล้ว +1

    Vidéo très passionnante. Merci. Amicalement.

  • @AndrewTunks
    @AndrewTunks 10 ปีที่แล้ว +4

    As many others have said, you really do have a gift for teaching; truly the best tutorial videos I've seen online. I've watched basically the entire SSRS series and VBA series, and have learned SO MUCH, I don't know what I would have done without your tutorials, but now I'm even thinking of getting more into programming. I've watched so many of these videos I almost feel like I know you now haha. I'll be in London in/around November, can I buy you some pints for improving my career/knowledge? =)

  • @myal1717
    @myal1717 7 ปีที่แล้ว

    Andrew your the best I ever seen: the way u organised the videos are simply awesome! In an every videos of yours I get some trivia and so on...

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

    Great video! You can also track the exact line number of an error by using the Erl function (if you add VBA line numbers).

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

    Thanks, Andrew for the wonderful video.

    • @WiseOwlTutorials
      @WiseOwlTutorials  4 ปีที่แล้ว

      You're welcome Sayyad, thank you for watching!

  • @shruti9139
    @shruti9139 5 ปีที่แล้ว

    Thank you Andrew, you are life saver. Your vedios help me to complete my task. Whenever I face issue, I approach to your vedios. They are really helpful. I really greatful 😊

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

    Comprehensive tutorial !

  • @jparker6351
    @jparker6351 10 ปีที่แล้ว

    Thank you so much for this tutorial. You did an excellent job explaining the topic without a lot of unnecessary material. It has been very difficult to find good tutorials, and I will be taking a look at what else you have to offer.

  • @chanthyum6825
    @chanthyum6825 7 ปีที่แล้ว

    thank you for developing these VBA videos

  • @PauloDoutel
    @PauloDoutel 9 ปีที่แล้ว

    THANK YOU VERY MUCH !!!
    Your Tutorials are really fantastic, you explain very well and I use them for my professional work.
    Fortunately they are LONG... that is the way to learn efficiancy.
    Best regards
    Paulo

  • @shailendranr4021
    @shailendranr4021 9 ปีที่แล้ว

    Wow, superb explanation, i have learnt VBA from you only, thank you so much

  • @maurocastagnera8949
    @maurocastagnera8949 6 ปีที่แล้ว

    You Andrew are simply a genius! 👏👏👏

  • @stefanodegemmis2518
    @stefanodegemmis2518 7 ปีที่แล้ว

    Great video as always! And I have a suggestion: When using previous excel sheet examples, where there are formula already filled in, I would recommend to leave in the description a link (e.g. in dropbox) where the base of the macro can be easily downloaded. In this way people don't have to rewrite it by hand, nor have to look into the previous VBA classes to take the code (also because people like me like to change a little bit the code to make tests and what not, so the macro will never be the same as the one you make). Hope this feedback helps!

  • @IntelMan
    @IntelMan 8 ปีที่แล้ว

    Superb Andrew Gould
    very very helping indeed
    thank you very much

  • @esdkingston
    @esdkingston 9 ปีที่แล้ว

    Its just great. I have learnt a lot from these videos.

  • @caribeiro77
    @caribeiro77 10 ปีที่แล้ว

    Hey Andrew, really awesome videos, saw them all ( your VBA series), enjoyed a lot, still learning ( and have a lot to learn), and waiting for more... :-)
    Thanks....

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

    Great video 📹 👍 Thank you for your hard work

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

      You're welcome Nader, thanks for watching!

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

      @@WiseOwlTutorials how can I take VBA courses online or in person through your organization ? I am in Egypt but willing to travel to the UK 🇬🇧 to take the courses

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

      @@nadermounir8228 Hi Nader, you can find information on dates, prices and the booking process on our website www.wiseowl.co.uk/
      I hope it helps!

  • @LordBransty
    @LordBransty 6 ปีที่แล้ว

    Brilliant! - found exactly what I was looking for, and some unexpected surprises which will come in really handy!

  • @chrisklest1238
    @chrisklest1238 6 ปีที่แล้ว

    This video saved my life.

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

    another amazing video. thanks!

  • @luismorana5072
    @luismorana5072 10 ปีที่แล้ว

    Yes...I agree Andrew is the best and knows how to teach VBA. Thank you!!
    Are you thinking to do videos on UserForms? That would be awesome. Thank you again.

  • @marcip1456
    @marcip1456 7 ปีที่แล้ว

    Fantastic as always!

  • @ajinkyarasal5965
    @ajinkyarasal5965 7 ปีที่แล้ว

    Your videos really simple and easy to understand.
    Could you please do a video on Storage Item?
    it would be a great help

  • @jadermaru7168
    @jadermaru7168 5 ปีที่แล้ว

    me ha sido de mucha utilidad el video para realizar un codigo en el control de errores en unos de mis desarrollos me costo trabajo entender la estructura pero gracias a ti logre implementarlo correctamente

  • @mariapazcarvacho3463
    @mariapazcarvacho3463 8 ปีที่แล้ว +2

    Thanks! Error handled succesfully :)

  • @krispykatz6214
    @krispykatz6214 5 ปีที่แล้ว

    Thank you, Wise Sir.

    • @krispykatz6214
      @krispykatz6214 5 ปีที่แล้ว

      Will surely watch all your vids including the ads haha! These type of vids are worth the ads!

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

    Amazing tutorial, thanks a lot!!

  • @joelbyrne
    @joelbyrne 10 ปีที่แล้ว

    Finally! A demonstration where the content is useful and the teacher doesn't just storm through the data leaving zero absorption time!
    I have an excel program which is used in the company I work for which comprises roughly 8 separate userforms. Currently when an error is thrown I use a custom message box based on the output from Select Case statement. Depending on this the program then selects a hidden sheet and adds the error data i.e. Number, description etc and also logs the username of the employee plus the date and time occurred. This is a lot of programming as it needs to be done at each potential instance of an error.
    Is there a more global way of capturing this data with a Public Sub?
    Your response would be greatly appreciated...
    Joel Byrne

  • @b.petrushchak
    @b.petrushchak 9 ปีที่แล้ว

    Thank you for an interesting video. It's a pity that I didn't find it a year ago - it would save me a lot of lost time.

  • @giuliko
    @giuliko 8 ปีที่แล้ว

    Awesome explanation. Congratulations once again for the incredible content you're showing us here. One question, where can I find the errors numbers of each error?

  • @MagnusAnand
    @MagnusAnand 7 ปีที่แล้ว

    I love your videos!

  • @zohrehtorabian2087
    @zohrehtorabian2087 10 ปีที่แล้ว

    I'm thankful for the series of videos and they are quite educational! You have a talent for teaching.. the best so far. However I also searched for Microsoft C# series. Do you have that available now? Thank you..

  • @dbascb
    @dbascb 10 ปีที่แล้ว

    Excellent. Thank you

  • @gbrkapildevreddy1475
    @gbrkapildevreddy1475 7 ปีที่แล้ว

    good presentation

  • @SyedKollol
    @SyedKollol 10 ปีที่แล้ว

    Hi Andrew, I have suggested two of my workmates to your videos. These are just awesome! thanks for your help. Are you going to publish videos on Class sooner?

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

    very good video!

  • @sushantjaiswal9969
    @sushantjaiswal9969 8 ปีที่แล้ว

    awesome training collection Andrew, could you please upload Ms Access trainings if it is available with you it would be really helpful..

  • @samuelkingston4572
    @samuelkingston4572 7 ปีที่แล้ว

    Very nice Sir.

  • @Barnardrab
    @Barnardrab 6 ปีที่แล้ว

    I've read that the clunky On Error thing will be replaced by the standard try/catch in the future.

  • @hindi_recap1
    @hindi_recap1 6 ปีที่แล้ว

    Hi Andrew,
    Your videos are awesome.
    Can you please help on how can we control internal tools on our system using VBA.
    Does it require downloading external libraries like selenium ?

  • @pefington
    @pefington 3 ปีที่แล้ว

    For anyone watching now, if whatever you do the error handling doesn't trigger, go to tools, options, general and change the error trapping option. This drove me crazy!

  • @vivekdesai8500
    @vivekdesai8500 5 ปีที่แล้ว

    Thank you!

  • @abslany50
    @abslany50 5 ปีที่แล้ว

    @WiseOwlTutorials, May you tell me, is VBA stil relevant as a tool in different nowadays tasks and in demand by IT-companies?

  • @AbdoooElYaddak
    @AbdoooElYaddak 7 ปีที่แล้ว

    Thank you very much for this tutorial. I have a question .. @ 18:30
    What if I wrote "GOTO GuessAgain" instead of "resume GuessAgain"?
    is there any difference? .. "resume" command can be used next I guess, but I can't think of a useful situation for this ...

  • @NaimaEchalhi
    @NaimaEchalhi 3 ปีที่แล้ว

    Hi Andrew, I really liked the video it is fantastic as always.
    I have a question, I did a code (with the valuable help of your videos 😉) that enabled me to copy data from multiple workbooks to one worksheet, however the whole data were copied and I wanted data that are only valid for the criteria *breach*, so I applied the autofilter method but since some workbooks do not have this criteria in them, an error message keeps popping out and I got stoke there. Do you have any advise on this please ?
    Thank you very much 😊

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Naima! Can you post your code here and show the exact text of the error message you see and indicate which line causes the error?

  • @johassan6509
    @johassan6509 4 ปีที่แล้ว

    mmm I ran into a funny scenario here. I'm not sure why. I ran the On Error GoTo CreateSheet45... which worked fine it created the sheet, then it jumped to a Function from video part 18 "Function CustomDate(DateToFormat As Date, Optional IncludeTime As Boolean = False) As String" very strange. my code is identical to yours?

  • @FRANKWHITE1996
    @FRANKWHITE1996 8 ปีที่แล้ว

    thank you

  • @VBAbyMBA
    @VBAbyMBA 4 ปีที่แล้ว

    please help!
    which free software is best for screen recording while in debug mode??

  • @VictorKap
    @VictorKap 7 ปีที่แล้ว

    Hi Andrew, thanks a ton for these amazing videos. i hope you dont mind directing me to solution to the problem i am facing with one of my application. i have a data analyzing sheet which import raw data and create a new sheet named with that criteria i have put, the problem is when someone run twice the same criteria it comes with a obvious error as workbook cant have 2 sheets with same name. is there any way that i can put in my error handler to check if the sheet already exists and tell the user that its already exists... to handle the error gracefully i guess.

    • @VictorKap
      @VictorKap 7 ปีที่แล้ว

      You are a life saver Andrew, can't thank you enough

  • @fangyan1854
    @fangyan1854 10 ปีที่แล้ว

    very helpful

  • @jayjayf9699
    @jayjayf9699 5 ปีที่แล้ว

    why cant you put the error handler after the end sub part that would save you having to put exit sub???

    • @abslany50
      @abslany50 5 ปีที่แล้ว

      @@WiseOwlTutorials Please answer my question, need your response: is VBA stil relevant as a tool in different nowadays tasks and in demand by IT-companies?

  • @nanettehughes7468
    @nanettehughes7468 8 ปีที่แล้ว

    Good morning, I enjoyed this
    video and was able to get a little further in coding.. My question to you is that I'm working in Access, so I hope you’re still able to help me out.
    Form B gets information from Form A; if the information in Form A doesn't exist I get a msg box letting me know. I then go to Form A (without deleting the information I just typed in Form B that caused the msg box to pop up), I then enter the new record in Form A. I go back to Form B to continue on and I still receive the same msg box, I have to select new record and re-enter the information for it to show up without giving me the msg box error.
    I would like Form B to recognize the update in Form A and let me continue on without having to select a new record. Is this possible? I’m not using a module I’m putting code in the before_event.Thank you for your time.Nanette

  • @rohansharma8157
    @rohansharma8157 10 ปีที่แล้ว

    Whenever I try to use goto two times within a code, the second time around it doesn't work. I have a user entering an input into an input box and this is used to pull data from a file. If the user enters a certain type of file, it pulls data from the file. If excel cannot find it, I have vba go to an error handler which asks the user to reenter the file and then vba looks for it again. However, on the second time around, if excel still can't find it, a run time error 1004 pops up. My question is why doesn't the error handler send the program to the label the second time around?

    • @rohansharma8157
      @rohansharma8157 10 ปีที่แล้ว

      *****
      Works perfectly! Thanks :)

  • @AbdoooElYaddak
    @AbdoooElYaddak 7 ปีที่แล้ว

    any info about "On Error GoTo -1" ?

  • @rajas4433
    @rajas4433 7 ปีที่แล้ว

    Great video but sound quality is very low

  • @suddenlyy108
    @suddenlyy108 6 ปีที่แล้ว

    thanks!!!!!!!!!!!!!

  • @alibaig4994
    @alibaig4994 7 ปีที่แล้ว

    Any one plz guide me that how can an error 1004 be removed? Its a Run Time error in MS Excel (stats tool package2). Early guidance may plz be solicited.

  • @ajitkr8233
    @ajitkr8233 8 ปีที่แล้ว

    Hi WiseOwl,
    I am getting an error when trying to run a template which has macro(Vba) coding in backend.
    The error message is " 57121 Application defined or object defined Error".
    I tried finding search,and i saw about activex setting in excel but that didn't work, even macros are in enabled mode.
    Now the problem is that the excel sheet containing macros run on some machines. I don't know whats wrong in some systems.
    Will appreciate any suggestion that may work. :):)

    • @ajitkr8233
      @ajitkr8233 8 ปีที่แล้ว

      +WiseOwlTutorials Yes activeX control is enabled in all machines.As i wrote previously the error is 57121,while debug there is no specific line highlighted, i think the objects are not recognized as a result there is a problem in the methods. Any specific solution that u suggest?

  • @francoga4189
    @francoga4189 4 ปีที่แล้ว

    Wise Owl, thank You for all Your VBA videos, You are truly very wise. I have a weird problem which happened a few times now, if You would be so kind as to help me. Excuse me for the formatting, but for some reason TH-cam changes it every time . I wrote a similar code like You:
    Sub ErrorsInVBA()
    On Error Resume Next
    Application.DisplayAlerts = False
    Worksheets("Sheet42").Delete
    Application.DisplayAlerts = True
    End SubIf I don't have a "Sheet42" this all runs fine and dandy. But, if I do have a "Sheet42", stepping through the code I get to Worksheets("Sheet42").delete, then I press f8 and I am transported to my Creating Functions pt1 module, to a function CustomDatabase, which You covered in an earlier video. Function CustomDate(DateToFormat As Date, Optional IncludeTime As Boolean = False) As String
    'Boolean = false means that if the user doesn't type in data _
    the default value would in this case be false; can be true
    If IncludeTime Then
    CustomDate = Format(DateToFormat, "dddd dd mmmm yyyy hh:mm:ss")
    Else
    CustomDate = Format(DateToFormat, "dddd dd mmmm yyyy")
    End If
    End Function
    This complete function runs, which means it ends, and than I am transported back to ErrorHandling module, to Application.DisplayAlerts = True.This happened already a few times with different subroutines but I ignored it. Now it seems that it will keep bugging me. Do you know what's the problem here?Kind regards,Fran

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

    Sub'd by the way

  • @theguildedcage
    @theguildedcage 7 ปีที่แล้ว

    Have you thought about putting your courses on Udemy?

  • @AmbaPrasadReddy
    @AmbaPrasadReddy 9 ปีที่แล้ว

    Dude your videos are very awesome but they are too long

    • @AmbaPrasadReddy
      @AmbaPrasadReddy 9 ปีที่แล้ว

      ***** Dude I really love ur videos they are awsome. I have no issue with the content and information provided and the examples you provide makes it easy to understand the topics...thank you for doing these :)

    • @conspirisi
      @conspirisi 8 ปีที่แล้ว

      +WiseOwlTutorials Beneath the video just stick in the links to the individual sections (youtube can link to time). Appreciate this takes time, so if I'm taking notes to some of your videos I'll send you my links.