# 8.1 Creating Multi-Factor Calculation Using Forms Part 4

Video Activity

Join over 3 million cybersecurity professionals advancing their career

Sign up with

Required fields are marked with an *

or

Already have an account? Sign In »

Video Transcription

00:00

So

00:01

we're just now going to test if everything here is Okay,

00:06

So we're going to click your and start calculation. You're going to get

00:10

A and B And let's do this with numbers we know

00:14

and let's see calculate. And of course, we get an error.

00:21

Uh, because we haven't typed here t every got it as an error throughout

00:30

this

00:32

code.

00:33

So I have corrected on three

00:36

places. You're going to close it close this, closed the bugger

00:42

and let's start again. So 34 you see, I'm typing Tab. I'm not moving

00:48

the mouse and let's click calculate,

00:53

and, uh, we're having another her. Let's just check what it is

01:02

block. If

01:10

here.

01:11

So here. One if

01:12

then we have another If

01:18

and uh

01:23

so,

01:26

yeah, let's

01:29

just move this. So it's

01:36

so this is if this is else

01:42

and this is Andy from this if

01:46

and then we have this one

01:51

and then we have this one

01:53

and it should be working. Let's check why this isn't the case,

02:00

Okay? Yes. So we had

02:04

we had to put one more. If here,

02:13

if I think now it's going to be OK. So you see these things are happening and you have to be very careful or you could write it on paper

02:22

and then it should be much better. Also, we have here a typo

02:29

So these things have to be corrected that everything is going to look nice.

02:34

Save it. Let's close it.

02:38

We'll stop to the bugger and let's do

02:42

testing

02:44

and we here we go to five, so everything is fine.

02:47

Let's just close this and try to be, uh,

02:53

something that is wrong. You need to enter to the miracle values.

02:58

And if he enter here minus three and here five

03:01

calculate, you can enter only positive numbers. And if we enter here three and here we put nothing. And here we put one and try to calculate we get the message that age has to be greater than a so everything is fine.

03:22

And let's see.

03:24

Yeah, it tries to do the square because we haven't stopped.

03:29

It didn't stop. But it's okay.

03:34

We're not going to go into greater details.

03:38

We're just going to leave it like this, so it will remind you that something is wrong. It tried to calculate square root from the negative number, which we expected that will happen.

03:51

And let's just close this. So the user has been warned

03:57

and it's closed. So this one is working perfectly fine. And now we have solved this task. We have successfully done this exercise,

04:08

and I strongly encourage you to make a different formula. For example,

04:15

like this would be the Maur,

04:18

uh, did more. So let's let's make an equation here.

04:25

And ah,

04:27

let's, uh, let's make it, for example, this

04:31

and, uh but let's make it

04:36

a little bit more interesting,

04:40

so it's make bigger.

04:43

And let's say that a is equal.

04:46

Ah,

04:47

a plus B plus c closed this and then divided by

04:55

three. Not a but sorry

04:58

Ah B plus

05:03

plus

05:05

see

05:09

Plus

05:10

the

05:12

So we have four. And again we can have just one that is empty

05:18

so you can exercise with this so it will have more complex structure because now we have four fields and three have to be filled. But if you have time and well, I strongly suggest to try to write the macro that will

05:32

calculate this so you will enter three

05:36

and it will give you the fourth.

05:40

So that's it for the *** essays or this example,

05:45

and let's continue to the next one

Up Next

Instructed By

Similar Content