Skip to content

Instantly share code, notes, and snippets.

@milk19873
Created September 22, 2017 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milk19873/5ef902e5095d318b99d3d59cceca6681 to your computer and use it in GitHub Desktop.
Save milk19873/5ef902e5095d318b99d3d59cceca6681 to your computer and use it in GitHub Desktop.
5回計算の例1(VBA)
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