Join Curt Frye for an in-depth discussion in this video Managing worksheets with VBA, part of Learning VBA in Excel.
On the face of it, worksheets within a workbook seem fairly static.…They hold your data, charts and other objects, but aside from renaming them or…changing their tab color,…it seems like you rarely change them.…That might be true in normal usage, but when you write VBA code, you will find…that you change your worksheets quite often.…There are two ways of referencing worksheets: The first is by position, and…the second is by name.…I'll switch over to the Visual Basic Editor to show you what I mean.…I will just create a new subroutine: Sub SheetTest.…
If I want to display a worksheet, I can do so using the Activate method.…So if I have Worksheets and then the name of the worksheet, I will call it…Sheet3.Activate, and press F5 to run it, flip back to the workbook, and you can…see the Sheet3 appears.…If I do the same thing for Sheet1, then Sheet1 appears.…Now, let's see the same thing by number.…Let's say that I want to display the sheet in the second position, in this…case that would be Sheet2, so when I press F5 and flip back, you see that we are on Sheet2.…
- 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 2016: Power Query (Get & Transform)with Oz du Soleil1h 49m 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.