👉 Ready to master VBA?
- Check out my full courses: courses.excelmacromastery.com/
- Subscribe to the channel here: bit.ly/36hpTCY
-Want to download the source code for this video? Go here: bit.ly/3kYVdmb
(Note: If the download page doesn't work then make sure to turn off any popup blockers)
Copying Data from User Selected Files Using GetOpenFilename
In this video I show how to use the GetOpenFilename function to allow users to select the file to open. Then
once the file is selected I show how to copy the data from this file to our current workbook. Most tutorials stop there but I will show you how to optimize this code so that if you are doing serious data analysis you have the fastest and cleanest code possible.
#ExcelVBA #VBAGetOpenFilename #VBAOptimizedCode
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)
Негізгі бет Ғылым және технология Copying Data from User Selected Files Using GetOpenFilename
Пікірлер: 52