So, I know how to assign a macro to a graphic, but I'm confused as to what my assignment is asking for. Below are the instructions, as given:
In this exercise, you will insert a textbox in a worksheet, label it “Start”, and assign a macro to it to calculate the thinness ratio of a rectangle which is given by the following relationship:
Thinness Ratio = Area/(Perimeter)^2
Your macro will ask for length and width of the rectangle through the InputBox() function. It will then calculate the area and perimeter of the rectangle using the following formulas:
Area = Length*Width
Perimeter = 2*(Length + Width)
It will then calculate the thinness ratio and display the result through the MsgBox() function. Make sure you include comments in your code.
I understand he wants me to write a macro and assign it to a textbox that will act as the "Start" button, but if anyone could explain a little further or offer some insight on how to start the macro, i'd appreciate it.
In this exercise, you will insert a textbox in a worksheet, label it “Start”, and assign a macro to it to calculate the thinness ratio of a rectangle which is given by the following relationship:
Thinness Ratio = Area/(Perimeter)^2
Your macro will ask for length and width of the rectangle through the InputBox() function. It will then calculate the area and perimeter of the rectangle using the following formulas:
Area = Length*Width
Perimeter = 2*(Length + Width)
It will then calculate the thinness ratio and display the result through the MsgBox() function. Make sure you include comments in your code.
I understand he wants me to write a macro and assign it to a textbox that will act as the "Start" button, but if anyone could explain a little further or offer some insight on how to start the macro, i'd appreciate it.