Created
September 22, 2017 08:11
-
-
Save milk19873/5ef902e5095d318b99d3d59cceca6681 to your computer and use it in GitHub Desktop.
5回計算の例1(VBA)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub MainSub() | |
Dim i As Integer | |
Dim a As Integer | |
a = 5 | |
For i = 1 To 5 | |
Sheets("Sheet1").Cells(i, 1).Value = CalcFunc(a, 5) | |
Next | |
End Sub | |
Function CalcFunc(a As Integer, b As Integer) As Integer | |
Dim result As Integer | |
a = a + 5 | |
result = a + b | |
CalcFunc = result | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment