From the course: Excel: Learning VBA
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Challenge: Add logic to your code - Microsoft Excel Tutorial
From the course: Excel: Learning VBA
Challenge: Add logic to your code
(bright music) - [Narrator] Now that we've reached the end of the chapter, I would like to offer you some challenges to use the skills that you've learned, and these will relate to adding a logic to your VBA code. So there's a couple of challenges, and here's the first one. I will ask you to define a for next loop to repeat instructions within a subroutine. Then I will ask you to display each member of an array using a for each loop. Finally, I will ask you to create an if then statement that allows you to create a condition where something either will be done or it won't be done. As always, there are three elements to the challenge. First, prepare, read the comments in each code module to learn about the challenge. Secondly, create your solution by adding or editing the existing code to create a solution that meets the challenge. And finally third, test your solution by running your code to make sure it works as expected.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Repeat a task using a For…Next loop5m 6s
-
(Locked)
Step through all items of a collection using a For…Each loop4m 37s
-
(Locked)
Repeat a task using a Do loop5m 47s
-
(Locked)
Execute code conditionally using an If…Then statement6m 48s
-
(Locked)
Select which action to take using a Case statement3m 42s
-
(Locked)
Challenge: Add logic to your code2m 52s
-
(Locked)
Solution: Add logic to your code4m 40s
-
-
-
-
-
-