Subprocedures - Excel

Copper Contributor

Hello guys I have some work to do hope you could help me a littlw with this one. Thank you ;)

 

Title: Sub procedures

A sub procedure is a group of reusable code which can be called anywhere in your program. This eliminates the need of writing the same code over and over again. This enables the programmers to divide a big program into a number of small and manageable sub procedures. Sub procedures don’t return any values.

Example:

novys8_0-1625592237336.png

 

We declared two sub procedures: ShowMessage() and MySum(). Next they were called in the sub procedure Button1_Click()

 

Task 1

Type and check the code above.

 

Task 2

Write a sub procedure that will count the area of the triangle, reading the coordinates of its vertices from spreadsheet.

1 Reply
This looks like it is a homework question. What have you tried yourself so far?