From the course: Excel VBA: Process Modeling
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Add code to calculate and write out times
From the course: Excel VBA: Process Modeling
Add code to calculate and write out times
- [Instructor] In the approach to process modeling I am demonstrating in this course, I am using classes to represent business objects such as customers and stations. When you create an instance of a class, you can add that instance to a collection of objects. In this movie, I will use a For Next loop to move through the objects in the stations collection to calculate processing times. I'll use other techniques later in this course, but I wanted you to see how For Next works in this situation. My sample file is Chapter02_05, and that's a workbook you can find in the chapter two folder of the exercise files collection. We have already read in information about the number of stations and their mean and standard deviation processing time, so we can now go over to the Visual Basic Editor and create code that will use that information to calculate processing times. I'll press Alt + F11 to move to the VBA Editor. Now that…
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
-
-
-
-
(Locked)
Define process flow and programming goals55s
-
Declare variables used in the simulation6m
-
(Locked)
Define the Customers class and add a customer4m 48s
-
(Locked)
Define the Stations class and add a station8m 56s
-
(Locked)
Add code to calculate and write out times6m 2s
-
(Locked)
Delete unneeded objects1m 50s
-
(Locked)
Run the simulation1m 55s
-
(Locked)
Adapt the code for multiple runs4m 8s
-
(Locked)
-
-
-
-
-
-