👉 Ready to master VBA?
- Check out my full courses: [ Ссылка ]
- Subscribe to the channel here: [ Ссылка ]
- FREE CHEAT SHEET: Get the free cheat sheet on VBA arrays here: [ Ссылка ]
(Note: If the download page doesn't work then make sure to turn off any popup blockers)
VBA Error Handling Explained in Plain English (with examples)
Related Article: VBA Error Handling - A Complete Guide([ Ссылка ])
Useful VBA Shortcut Keys:
Compile the code: Alt + D + C or Alt + D + Enter
Run the code from the current sub: F5
Step into the code line by line: F8
View the Immediate Window: Ctrl + G
View the Watch Window: Alt + V + H
Auto complete word: Ctrl + Space
Shift + F2: Get the definition of the item under the cursor.
Ctrl + Shift + F2: Go to the last cursor position.
Alt + F11: Switch between Excel and the VBA Editor.
Ctrl + R: View the Project Explorer Window.
Ctrl + Shift + 8(or Ctrl + *): Get the current region on a worksheet.
Tab: To move lines of code to the right(Indent).
Shift + Tab: To move lines of code to the left(Outdent).
F4: View the Properties Window.
F9(or click left margin): Add a breakpoint to pause the code.
Table of Contents:
00:00 - Introduction
00:24 - Ensure the error settings are correct
00:55 - Remove all Compile errors
02:45 - Dealing with Runtime Errors
04:45 - The 3 Error Handling States
06:57 - On Error Goto 0
08:09 - On Error Resume Next
10:22 - On Error Goto [label]
15:18 - Cleaning up after an error occurs
17:54 - Turning off Error Handling
19:03 - Unwinding the code
21:19 - Error Handling in a Nutshell
21:23 - Recap
Ещё видео!