Want to improve your Excel VBA skills fast? Go here: ▸https://courses.excelmacromastery.com/
Want to download the source code for this video? Go here: https://shorturl.at/yBSVX
Subscribe to the channel here: https://bit.ly/36hpTCY
How to Create a UserForm Like a Pro
Creating UserForms in VBA should not be that complicated. However, there are lots of pitfalls for the unwary. For example
1. How do you retrieve a value after the userForm closes?
2. How do you avoid automation errors if the error cancels using X?
3. How do you stop a modeless UserForm from disappearing?
4. How do you pass the initial settings to the UserForm before the initialize event runs?
...and so on.
In this video, I show how to create a Modal and Modeless UserForm and how to avoid the issues that arise when you use them.
💻🔧 #VBA #VBAUserForm #UserForm #ExcelVBAUser #modal
Learn how to build Excel VBA Applications the right way using best practices and proven techniques
The Excel VBA Handbook Course(https://TheExcelVBAHandbook.com)
Free Excel VBA Resources
Excel VBA Articles (https://excelmacromastery.com/vba-articles/)
Useful VBA Shortcut Keys
========================
Debugging:
Compile the code: Alt + D + L OR Alt + D + Enter
Run the code from the current sub: F5
Step into the code line by line: F8
Add a breakpoint to pause the code: F9(or click left margin)
Windows:
View the Immediate Window: Ctrl + G
View the Watch Window: Alt + V + H
View the Properties Window: F4
Switch between Excel and the VBA Editor: Alt + F11
View the Project Explorer Window: Ctrl + R
Writing Code:
Search keyword under cursor: Ctrl + F3
Search the word last searched for: F3
Auto complete word: Ctrl + Space
Get the definition of the item under the cursor: Shift + F2
Go to the last cursor position: Ctrl + Shift + F2
Get the current region on a worksheet: Ctrl + Shift + 8(or Ctrl + *)
To move lines of code to the right(Indent): Tab
To move lines of code to the left(Outdent): Shift + Tab
Delete a Line: Ctrl + Y(note: this clears the clipboard)