Val() | |
CStr() | |
CInt() | Integer |
Cvar() | Variant . |
, , , TextBox. , :
TextBox3.Text = TextBox1.Text + TextBox2.Text
, . , 100 200, 100200, , , .
, , ( ). CInt. :
TextBox3.Text=CInt(TextBox1.Text)+ CInt(TextBox2.Text)
300. , :
TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
Val.
. :
Abs(x) | x |
Cos(x) | , |
Sin(x) | , |
Sqr(x) | x |
Rnd[(x)] | 0 1. , , |
Int(x) | x |
Tan(x) | x |
Atn(x) | , |
Exp(x) | e, x, e |
Log(x) | x . |
100 :
x=100
y=Sqr(x)
y 10.
, : . :
, , Windows. :
InputBox ;
MsgBox .
|
|
: (InputBox) (MsgBox). , , Windows.
[1]:
InputBox( [, ] [, ])
, , , OK , . , . OK, , . , , , .
: , , , . , , . . , . , ( , ).
: Val(), CInt(), Cvar() .
. 15 , :
A = InputBox( :, InputBox)
. 15.
MsgBox, [2]:
MsgBox( [, ] [, ])
, , - (, ). , , , , .
, , , . ():
MsgBox [, ] [, ]
, . . 1024 ! , , , .
, VBA , OK. [ ] .
, . , .
. 16 , :
MsgBox " ?", 4 + 32 + 256, ""
. 16.
MsgBox : , . , . , - .
|
|
, () .
:
[ ] Function () As
()
=
End Function
, . , ( ) : Public Private. Function , , ; ; ( ); As , ; ; , ; End Function , .
. , . , Excel (Excel ). .