Vba call function with multiple arguments

Vba call function with multiple arguments

Author: Alexandefree Date: 10.07.2017

And I get syntax errors. Modifying the sub to only take one argument and leaving out the 3 gives no errors, the problem is only when I have 2 arguments.

Pass optional objects to VBA functions - TechRepublic

When there is not any , between and , VBA thinks it's a formula and exactly one argument. By posting your answer, you agree to the privacy policy and terms of service. Stack Overflow Questions Developer Jobs Documentation beta Tags Users.

Creating Access VBA subs and functions: Using arguments and public variables - TechRepublic

Sign up or log in to customize your list. Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us.

Log In Sign Up.

vba call function with multiple arguments

Join the Stack Overflow Community. Stack Overflow is a community of 7.

vba call function with multiple arguments

Join them; it only takes a minute: Using VBA with Access , I have a sub: Public Sub setInterest account As String, dmonth As Integer End Sub And I am calling it with setInterest "myAccount",3 And I get syntax errors. This issue has been answered multiple times already.

How do I call a VBA Function into a Sub Procedure - Stack Overflow

When using multiple arguments, you can either write: Spent two hours struggling with that. I add this answer, for Why your syntax works with one argument? Public Sub setInterest account As String ' End Sub setInterest "myAccount" Note: When formula calculate the result will be like this: Sign up or log in StackExchange.

Excel VBA Introduction Part 18 - Creating Functions

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.

Stack Overflow works best with JavaScript enabled. Don't know if there is something more weird in the face of the whole Earth! MathOverflow Mathematics Cross Validated stats Theoretical Computer Science Physics Chemistry Biology Computer Science Philosophy more 3.

Meta Stack Exchange Stack Apps Area 51 Stack Overflow Talent.

inserted by FC2 system