Assigning a Macro to a Graphic - Assignment Instruction Help

knenok

New Member
Joined
Oct 30, 2018
Messages
6
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.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I'm pretty sure we don't do homework. If U start and get stuck, then some assistance will likely be provided. I'm guessing you're supposed to be learning about the events associated with a textbox (hint: see textbox change event to Start macro). Good luck. Dave
 
Upvote 0

Forum statistics

Threads
1,223,445
Messages
6,172,181
Members
452,447
Latest member
willsing5130

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top