About 7,090,000 results
Open links in new tab
  1. Calling Sub and Function procedures (VBA) | Microsoft Learn

    Jan 21, 2022 · To use the return value of a function, assign the function to a variable and enclose the arguments in parentheses, as shown in the following example. If you are not interested in the return value of a function, you can call a function the same way you call a Sub procedure.

  2. VBA Function - Call, Return Value, & Parameters - Automate …

    Oct 29, 2021 · Calling a Function from a Sub Procedure. Once you create a function, you can call it from anywhere else in your code by using a Sub Procedure to call the function. The value of 50 would always be returned. You can also call the GetRange function from a Sub Procedure.

  3. Function Statement - Visual Basic | Microsoft Learn

    Sep 14, 2021 · You call a Function procedure the same way that you call any library function such as Sqrt, Cos, or ChrW. You can also call a function by using the Call keyword. In that case, the return value is ignored.

  4. How To Call a Function in Microsoft Visual Basic - wikiHow

    Feb 17, 2025 · Use the syntax lvalue = functionName (argument1, argument2) to call functions in VB and VBA. If there are no arguments, omit the parentheses or leave them blank. If you're using VBA within a cell in an Excel spreadsheet, use the …

  5. VB.NET Functions Overview - Online Tutorials Library

    Function Returning a Value. In VB.Net, a function can return a value to the calling code in two ways −. By using the return statement. By assigning the value to the function name. The following example demonstrates using the FindMax function −

  6. Function statement (VBA) | Microsoft Learn

    Mar 29, 2022 · You call a Function procedure by using the function name, followed by the argument list in parentheses, in an expression. See the Call statement for specific information about how to call Function procedures. To return a value from a function, assign the value to the function name. Any number of such assignments can appear anywhere within the ...

  7. vb.net - How to call a function in Visual Basic - Stack Overflow

    Nov 11, 2014 · Using writer As System.IO.StreamWriter = New System.IO.StreamWriter(filepath", True) Dim recipient As String = tbRecipient.Text. If (tbRecipient.Lines.Count > 1) Then. recipient = "" For Each line As String In tbRecipient.Lines. recipient = recipient & " " & line. Next. recipient = recipient.Trim() End If. writer.WriteLine(recipient) End Using.

  8. Call a function or sub procedure in VBA - Code VBA

    Call a Function. The normal use of a function is to assign the value returned by the function to a variable. To use the return value of a function, assign the function to a variable and enclose the arguments in parentheses. An example is calling the built …

  9. Visual Basic 6 Tutorial => Creating & Calling a Function

    One is a Public Function (FnAdd). It takes two Integer arguments val_1 & val_2. It returns an Integer. This Function add the two arguments and return the value to the caller. Before the addition, the two arguments undergo a process in another Function. Which is a Private Function.

  10. How to call a function with function name reference to a string value in VB

    Apr 13, 2010 · To use it, you just need to pass in which implementation you want to use: WhichThingToUse.DoStuff. Rather than using a String variable to store which method to use, you need to instead store a New MyClassOne or a New MyClassTwo.

  11. Some results have been removed
Refresh