Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Functions in VBA
#1
Description:

Functions are blocks of code that perform specific tasks and return a value to the calling code. 
They are called by their name and can be used in expressions.

Example:

Function AddNumbers(a As Integer, b As Integer) As Integer
    AddNumbers = a + b
End Function

Sub ExampleFunction()
    MsgBox "The sum is: " & AddNumbers(5, 3)
End Sub
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)