MS Excel .
: . 1 2. 1, 60 . 50 100 . 1 $8, 2 - $5. , , .
Visual Basic for Application, . , . 1 2, .
. , ( ) ..
, . , , . , . , , , . , , . .
MS Excel , : , Label, TextBox, 1 2.
, ( ). , .
. MS Word.
1. . : 1 * 1 + 2 * 2.
|
|
: 1 + 2.
, 1 2, : 1 + 0,5 * 2.
. , , , 1 2. : 1 2 0, 50, 100. 60.
2. MS Excel. , . .
3. . Insert UserForm. . :
4. :
Sub 1()
UserForm1.Show
End Sub
SOLVER
Private Sub CommandButton1_Click()
Range("C2").Value = TextBox1.Value
Range("C3").Value = TextBox2.Value
SolverReset
SolverOk SetCell:="$B$7", MaxMinVal:=1, ValueOf:="0", ByChange:="$B$2:$B$3"
SolverAdd CellRef:="$B$2:$B$3", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$B$2:$B$3", Relation:=4, FormulaText:="öåëîå"
SolverAdd CellRef:="$B$5", Relation:=3, FormulaText:="50"
SolverAdd CellRef:="$B$5", Relation:=1, FormulaText:="100"
SolverAdd CellRef:="$B$6", Relation:=1, FormulaText:="60"
SolverSolve
End Sub
Microsoft Word 12.0
Private Sub CommandButton2_Click()
Dim myWord As New Word.Application
myWord.Visible = True
Set myDoc = myWord.Documents.Add
myWord.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
myWord.Selection.Font.Name = "Times New Roman"
myWord.Selection.Font.Size = 14
myWord.Selection.TypeText ""
myWord.Selection.TypeParagraph
myWord.Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify
myWord.Selection.TypeText " 1 2, :"
myWord.Selection.TypeParagraph
myWord.Selection.TypeText " - 1 " & Range("B2").Value & " "
myWord.Selection.TypeParagraph
myWord.Selection.TypeText " - 2 " & Range("B3").Value & " "
|
|
myWord.Selection.TypeParagraph
myWord.Selection.TypeText " 1 " & Range("C2").Value
myWord.Selection.TypeParagraph
myWord.Selection.TypeText " 2 " & Range("C3").Value
myWord.Selection.TypeParagraph
myWord.Selection.TypeText " " & Range("B7").Value
myWord.Selection.TypeParagraph
myWord.Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
myWord.Selection.TypeText "10 2009 ."
End Sub
5. . Excel.
6. . .
7. . .
8. . Word, :