/ VBA :
1) ;
2) .
p 6. X Value C5.
1. X=Cells(5,3).Value
2. X=Cells(5,3)
3. X=Range(C5)
7. X , 1+i 1+j .
X=Cells(1+i,1+j)
8. D8 x+2y.
Cells(8,4)=x+2*y
/ InputBox ( ) MsgBox ( ).
. .
:
MsgBox (prompt [,buttons] [,title] [helpfile, context])
InputBox (prompt [,title] [,default] [,xpoz] [,ypoz] [helpfile, context])
:
prompt , . , (Chr(13)), (Chr(10)) (Chr(13)&Chr(13));
title , . ;
helpfile , , . context, ;
default , ;
xpos . ;
ypos . ;
buttons , , , , , . , buttons, . 11.1.
11.1
buttons
vbOKOnly | "OK" ( ) | ||
vbOKCancel | "OK" "" (Cancel) | ||
vbAbortRetryIgnore | "" (Abort), "" (Retry) "" (Ignore) | ||
vbYesNoCancel | "" (Yes), "" (No) "" (Cancel) | ||
vbYesNo | "" "" | ||
vbRetryCancel | "" "" | ||
vbCritical | " " | ||
vbQuestion | " " | ||
vbExclamation | " " | ||
vbInformation | " " | ||
vbDefaultButton1 | ( ) | ||
vbDefaultButton2 | 2- | ||
vbDefaultButton3 | 3- | ||
vbDefaultButton4 | 4- | ||
vbApplicationModal | ( ) | ||
vbSystemModal |
MsgBox , . 11.2.
|
|
11.2
MsgBox
vbOK | OK | |
vbCancel | (Cancel) | |
vbAbort | (Abort) | |
vbRetry | (Retry) | |
vbIgnore | (Ignore) | |
vbYes | (Yes) | |
vbNo | (No) |
9. y()=32+2x-1. InputBox. MsgBox ( ). : Y(X)= 3X^2 + 2X -1.
.
VBA (. 11.2). Run Run Sub/UserForm F5. x (. 11.3) (. 11.4).
. 11.2. VBA
11.3. InputBox x
. 11.4. MsgBox
10. y(x)=2x+5sin(x/2), x Î [-10; 10].
. , 1:22 (. 11.5).
. 11.5.
VBA :
Public Sub Grafik()