, , Function, , . , , Excel. , :
1. , . , .
2. .
3. , , Excel VBA.
, , . . , , , Excel, , () ().
, , , . . , , :
1. .
2. , .
3. .
4. , , .
5. , , .
, , , VBA. Public. \\. () .
. , :
Public Function SalesTax(SalesAmount)
SalesTax = SalesAmount * 0.35
EndFunction
. , :
=SalesTax(50)
=SalesTax(B1)
.1 , . .
. 1.
1
2. . , , , , MS Excel. MS Excel.
3. 1 , . .
2
2. . , , , , MS Excel. MS Excel.
|
|
3. 1 , . .
3
2. . , , , , MS Excel. MS Excel.
3. 1 , . .
4
2. . , , , , MS Excel. MS Excel.
3. 1 , . .
5
2. . , , , , MS Excel. MS Excel.
3. 1 , . .
6
2. . , , , , MS Excel. MS Excel.
3. 1 , . .
7
2. . , , , , MS Excel. MS Excel
3. 1 , . .
8
2. . , , , , MS Excel. MS Excel.
3. 1 , . .
|
|
9
2. . , , , , MS Excel. MS Excel.
3. 1 , . .
10
- . , , , , MS Excel. MS Excel.
- 1 , . .
4
- Excel . Workbook_Open()
- .
- , .
- : ,
- Excel.
- , . .
- ( )
- Excel( ).
:
Private Sub CommandButton1_Click()
Range("A1").Activate
l = "1"
While l <> ""
ActiveCell.Cells(2).Activate
l = ActiveCell.Value
Wend
ActiveCell.Value = TextBox1.Text
ActiveCell.Cells(, 2).Activate
ActiveCell.Value = TextBox2.Text
ActiveCell.Cells(, 2).Activate
ActiveCell.Value = TextBox3.Text
End Sub
: