Skip to content

Instantly share code, notes, and snippets.

@milk19873
Created September 20, 2017 12:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Subプロシージャ例1
Sub MainSub()
'Callを使ってSubプロシージャを呼び出す
Call TestSub(5, 4)
End Sub
Sub TestSub(a As Integer, b As Integer)
Dim result As Integer
result = a + b
'計算結果を「A1」のセルに代入
Sheets("Sheet1").Cells(1, 1) = result
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment