Question
Hello I need help to resolvce this VBA exercice : Creation of a second sheet in your Excel file that we will use to store
Hello I need help to resolvce this VBA exercice :
Creation of a second sheet in your Excel file that we will use to store information. Extend the work of Assignment 1, accordingly: Next to having a random height between 1 and 10, the width of the newly created rectangles should be random between 1 and 5. Next to the button that creates random height and random width rectangles and a button that removes all of them, you create a third button. Every time you click this third button, for each shape that was created you print in the second sheet: The width of the shape The height of the shape.
After printing all of these widths and heights, you show in two separate cells the average width of all the shapes and the average height of all the shapes.
For each new rectangle, make it a 25% chance that the rectangle turns either blue, yellow, red or green. The height and width of the rectangles can only have integer values still. Furthermore, create a fourth button. This button represents the passing of time. The height of each rectangle should therefore decrease by one, after which the rectangle should reappear at the exact same spot with the same color. When the rectangle reaches height zero, it is discarded.
Creation of a new button that when clicked on introduces four small circles of equal size in the field, randomly placed. Each circle with a different color: red, blue, green, yellow. This will be the order pickers in the warehouse. Create a variable that keeps track of how many orders have been discarded according to the program that you created in Assignment 2
Extend the button that you created in the previous step where four circles were created. That means when clicking on the button also the following should directly happen: It takes the four circles and assigns the circles to a random rectangle of their own color. The assignment should become visible by the circles moving just below the assigned rectangle. To do the previous task, create two arrays. One containing the x coordinate of all four circles, one containing the y coordinate of all four circles.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started