VBA
:
- 110501 .._____________________
:
.._____________________________
_____________________________
2012
. 4
1. 5
, , . 5
WorkBook. , . 12
. 19
. 21
2. . 23
1. 2*2=1. 23
2. 4-3-22+3-3=0. 25
. 29
.. 30
.
1. 1 - WorkBook. , , , , .
2. 2 - .
3. . . . .
1) 2*2=1
2) 4-3-22+3-3=0
.
, , , ,. WorkBook. , , .
1.
, , .
- . - , . , . . - , . . - .
.
() (). - . . - , .
(fundamental) (generic). ( ) Delphi, , . Delphi, . , .. . () ( ).
|
|
:
(simple) - . .
(ordinal) - . . - , . . N N-1 N+1.
: (ShortInt, SmallInt, Integer, Cardinal, Int64, Word, LongInt, Byte, LongWord)
(Boolean)
(Char)
, ( )
( )
(real) . , . Real48, Real, Single, Double, Extended, Comp, Currency.
. Delphi .
ShortString - , 255 .
AnsiString, String - , ~2^31 .
WideString - ~2^30 Unicode
.. , , .
. :
set - .
array - .
record - .
class - .
classreference - .
interface - .
- , . . (typed) (untyped). . pointer. , . Delphi, - .
|
|
- , .
, (variant) - . .
(.. ) type :
type
TypeDeffinitionList
... TypeDeffinitionList - . 0. type .
TypeDeffinition1;
TypeDeffinition2;
... TypeDeffinitionN - .
TypeName=TypeDeclaration;
TypeName - , .
TypeDeclaration - .
, , . . "- - " "- -". . , . , " " . , .
. ( :-) .
- - - .
, var. :
var
VariableDeffinitionList
VariableDeffinitionList - . - .
VariableList1:VariableDatatype1;
VariableList2:VariableDatatype2;
VariableListN:VariableDatatypeN;
VariableList - VariableDataType.
VariableIdent1,VariableIdent2,...,VariableIdentN:VariableDataType;
VariableIdent - .
VariableDataType - .
- . . .
, .. . - 4. - 4. -, 8 ? 4 8 - . , . . 4 8 .
|
|
- (trueconstants) (typed). - . - . - -.
, . .
, - , const. :
const
ConstantDeffinitionList
... ConstantDeffinitionList - . , - .
ConstantDeffinition1
ConstantDeffinition2
ConstantDeffinitionN
ConstantDeffinition - . :
ConstantIdent=ConstantExpression;
, . :
ConstantIdent:DataType=ConstantExpression;
ConstantIdent - .
DataType - .DataType , .
ConstantExpression - . - . , , .
WorkBook. ,
Workbook
, , . , , . , . , , Excel .
1. Workbook | |
AcceptLabelsInFormula | True, . - True. |
HasRoutingSlip | True, . |
Routed | True, . |
MultiUserEditing | True, . |
AutoUpdateFrequency | ( ), . 0, |
AutoUpdateSaveChanges | True, . 5 1440, . |
ListChangesOnNewSheet | True, |
KeepChangeHistory | True, . |
ChangeHistoryDuration | , . , , |
CreateBackup | True, . |
CodeName | , Excel - . , "1", . . . , , . 1.Range(myRange) |
FullName | , , , . " ". |
FileFormat | " " , / |
HasPassword | True, |
Saved | True, . |
WriteReserved | True, . |
Workbook Excel 2000 | |
EnvelopeVisible | Excel 2000 , . |
VBASigned | Excel 2000 , , . " ". |
Workbook
|
|
Workbook. , Workbooks - Add, Open OpenTextFile. , . :
Save, SaveAs, SaveCopyAs - , Workbooks. SaveAs, , . - , , . .
Close - , Save, .
Activate - .
Route - . RoutingSlip.
AcceptAllChanges, RejectAllChanges - , .
RefreshAll - , .
PurgeChangeHistoryNow (Days,SharingPassword) - , , Days. .
Protect, ProtectSharing, Unprotect, UnprotectSharing - , .
ExclusiveAccess - , , , - , .
ChangeFileAccess(Mode, WritePassword, Notify) - . Mode, : xlReadWrite xlReadOnly. , WritePassword . Notify True, , .
|
|
AddToFavorites - Favorites .
PivotCaches - , . PivotCache. - PivotTable (), PivotCache.
RunAutoMacros - .
LinkSources([Type]), ChangeLink(Name As String, NewName As String, [Type As XlLinkType = xlLinkTypeExcelLinks]), OpenLinks(Name As String, [ReadOnly], [Type]), LinkInfo(Name As String, LinkInfo As XlLinkInfo, [Type], [EditionRef]), UpdateLink([Name], [Type]) - , . :
Excel,
, OLE (, Word, ) DDE,
,
, .
- LinkSources , . , Excel.
- Change , Open - , Info - , Update - . ( )
Workbook Excel 2000 :
Sub ReloadAs(Encoding As MsoEncoding),
SubWebPagePreview().
, , Excel . , , , HTML. .
ReloadAs(EncodingAsMsoEncoding) HTML, , , , , msoEncodingCyrillic.
WebPagePreview , Web-, .
Workbook , , Excel . , .
Workbook
, Workbook, . 20, 9 Workbook, 8 - Sheet, Window. , , , . , -, . Application.
. . , , . , , . , . ( - ) f(x)=0 [a; b], . , [a; b] . , . . : [a; b] ε, ε1 . . , f(x), [a,b], b>a. ε, , f(a)*f(b)<0 : f(x)=0; (1) x.
.
a, b, eps |
x= (a + b)/2,i=0 |
F (x)=x^2*2^x |
F(x) =0 |
Abs (F(x))<eps |
F(x)*F (a)>0 |
x: = b |
x = (a + b)/2,i=i+1 |
,i |
x: = a |
.1 - |
: , , . . , . . :
.
, :
.2.
.3. -.
x, f(x) |
f=d(x) |
|h|<=e |
f=d(b) |
h=f/f1 x=x-h |
F1=d1(x) |
F=d(x) |
X=a |
X=b |
F*f2>0 |
F2=d2(b) |
a,b,e |