Join Curt Frye for an in-depth discussion in this video Introducing Excel VBA data types, part of Learning VBA in Excel.
In the previous movies in those courses, I've used variables of several types to…represent values in my code.…Now that you have a general idea of how to use variables in your macros, I'd…like to go over the available data types in some detail.…Excel VBA has several data types, and you can find the information about them…by going into the Help system, typing "data type summary" and clicking the…article that comes up.…This table shows the data types that you can use in Excel 2007 VBA, and they're…pretty much the same for all the previous versions, as well.…
You'll notice that there are quite a few ways to represent numbers. Byte is 0 to 255;…Integer is from -32,768 to +32,767 and so on.…For most modern computers they're fast enough that it doesn't matter what type…of number variable you use to capture a value, but when computers were slower,…and their memory was more limited, defining a number as an integer, instead of a…single or double, saved quite a bit of memory and processing time.…That said, you should only use the Byte, Integer and Long data types when you're…
- Working in the Visual Basic Editor
- Adding code to a macro
- Creating, exporting, and deleting code modules
- Declaring and using variables
- Managing variable scope
- Defining arrays
- Managing workbooks and worksheets with VBA
- Repeating tasks with loops
- Debugging VBA code
- Cutting, copying, and pasting cell data
- Running and triggering event procedures
Skill Level Advanced
Excel 2010: Tips, Tricks, and Shortcutswith Dennis Taylor3h 43m Intermediate
1. Introducing Visual Basic for Applications (VBA)
2. Defining Variables, Constants, and Calculations
3. Adding Logic to Your VBA Code
4. Debugging Your VBA Code
5. Managing Workbook Elements and Data in VBA
6. Adding Advanced Elements to Your Workbook
7. Using Excel Events in Your VBA Code
8. Putting It All Together
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.