Subprocedures - Excel

%3CLINGO-SUB%20id%3D%22lingo-sub-2520318%22%20slang%3D%22en-US%22%3ESubprocedures%20-%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2520318%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20guys%20I%20have%20some%20work%20to%20do%20hope%20you%20could%20help%20me%20a%20littlw%20with%20this%20one.%20Thank%20you%20%3CLI-EMOJI%20id%3D%22lia_winking-face%22%20title%3D%22%3Awinking_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3ETitle%3A%20Sub%20procedures%3C%2FU%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EA%20sub%20procedure%20is%20a%20group%20of%20reusable%20code%20which%20can%20be%20called%20anywhere%20in%20your%20program.%20This%20eliminates%20the%20need%20of%20writing%20the%20same%20code%20over%20and%20over%20again.%20This%20enables%20the%20programmers%20to%20divide%20a%20big%20program%20into%20a%20number%20of%20small%20and%20manageable%20sub%20procedures.%20Sub%20procedures%20don%E2%80%99t%20return%20any%20values.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EExample%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22novys8_0-1625592237336.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F293818i272E46C3ED865664%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22novys8_0-1625592237336.png%22%20alt%3D%22novys8_0-1625592237336.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20declared%20two%20sub%20procedures%3A%20ShowMessage()%20and%20MySum().%20Next%20they%20were%20called%20in%20the%20sub%20procedure%20Button1_Click()%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3ETask%201%3C%2FU%3E%3C%2FP%3E%3CP%3EType%20and%20check%20the%20code%20above.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3ETask%202%3C%2FU%3E%3C%2FP%3E%3CP%3EWrite%20a%20sub%20procedure%20that%20will%20count%20the%20area%20of%20the%20triangle%2C%20reading%20the%20coordinates%20of%20its%20vertices%20from%20spreadsheet.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2520318%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New 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?