相关疑难解决方法(0)

在VBA中调用Sub

这是我的简化脚本:

    Sub SomeOtherSub(Stattyp As String)
        'Daty and the other variables are defined here

        CatSubProduktAreakum(Stattyp, Daty + UBound(SubCategories) + 2)

    End Sub

    Sub CatSubProduktAreakum(Stattyp As String, starty As Integer)

    'some stuff

    End Sub
Run Code Online (Sandbox Code Playgroud)

CatSubProduktAreakum的调用标记为红色,表示为"语法错误".我不明白这个错误.这是一个带有两个参数的简单子例程调用.为什么VBA不接受电话?

vba call syntax-error

40
推荐指数
2
解决办法
25万
查看次数

Call a function from sub in vba

I wrote this function, which is supposed to take the user defined cell from a chosen range and add or multiply its value by an user defined number. The output should be an array with one changed cell.

I was able to compile it; however, I cannot call it.

I tried to replicate what this and this but it failed.

Function Macro1(cellref As Range, row_number As Long, column_number As Long, x As Double, method As Integer) As Variant
'Number, which …
Run Code Online (Sandbox Code Playgroud)

excel vba function

0
推荐指数
1
解决办法
113
查看次数

标签 统计

vba ×2

call ×1

excel ×1

function ×1

syntax-error ×1