07-09-If-Then-Else.docm - . 7.11.
VBA - . If - Then - Else.
(. 7.4.)
7.4. | |
= | |
<> | |
> | |
< | |
>= | |
<= | |
Like | |
Is |
( 7.13.), . 18 - " 18 ", 18 - " 18 ".
a = InputBox(" ") If a < 18 Then MsgBox (" 18") If a >= 18 Then MsgBox (" 18 ")7.13. If - Then
- . , ? End If ( 7.14.)
a = InputBox(" ") If a < 18 Then MsgBox (" 18") MsgBox (" ") End If If a >= 18 Then MsgBox (" ")7.14. End If
, 18 .
If - Then - Else ( 7.15). If - Then 7.13. .
a = InputBox(" ") If a < 18 Then MsgBox (" 18") _ Else MsgBox (" 18")7.15. Else
Else . , - 7.16.
a = InputBox(" ") If a < 18 Then MsgBox (" 18") MsgBox (" ") Else MsgBox (" 18") MsgBox (" ") End If7.16.
If . , . , , , - , . , , , . And, "". And - 7.17.
UserName = InputBox(" ") UserPass = InputBox(" ") If UserName = "" And UserPass = "12345" Then MsgBox (" ") Else MsgBox (" ") End If7.17. And
|
|
: " 12345".
Or ( "") , . , , , , , - - . 7.18.
UserName = InputBox(" ") If UserName = "" Or UserName = "" Or _ UserName = "" Then MsgBox (" , " & UserName) Else MsgBox (" !") End If7.18. Or
And Or . Not () . , "".
If - Then - Else.
Text | ә | |
Font | қ | |
properties | қ | |
An object | ||
Method | ә | |
An object | ||
Treatment | өң |
.
- ?
- , ?
- ?
- ?
- ?
- ?
1. ____ :
- HTTP
- HTML
- Download
- IP
2. ?
- <S>
- <TR>
- <BR>
- <P>
3. HTML?
- , <table>
- , <draw table>
- , HTML
- , MS Word
4. <H1 Align=center> ?
5. VBA, Office?
- Office
- ,
- VBA C
- VBA
- 6. VBA shorthand PRINT? $$ (?)
- P
- (!)
7. , :
- Single
- Long
- Integer
- Double
8. MySalary(IF Revenue>=1000000 THEN MySalary=500000 ELSE MySalary=Poor me! END IF), :
- Variant
- Currency
- Single
- Double
: VBA (5-6 )
.
1. . . , ., , 2008.
2 Internet : http://www.intuit.ru/studies/courses/3735/977/info
|
|
3 19-20 , . | 4-, 3 5,7 2018-2019 . |
Selection
Selection, Range. , .
, Application.Selection , , . , - .
Selection . , . , .
, .
, . , ( , ..) . , , , .
Selection .
Selection.Text = ""Selection , . , , , , . , , .
Selection.
Selection