【发布时间】:2019-08-21 12:43:30
【问题描述】:
我在 VBA 中创建了一个函数,我想在我在 VBA 中创建的另一个函数中调用它。这样做的正确语法是什么?
这是我要调用的函数:
Function AlreadySigned()
Dim i As Integer
Dim j As Long
j = ActiveCell.Row - 1
Dim tmp As String
tmp = ActiveCell.Value
For i = 3 To j
If Cells(i, 2).Value = tmp Then
ActiveCell.Interior.ColorIndex = 3
End If
Next i
End Function
在这个函数中:
Function AlreadyRegisterLoop()
Dim i As Integer
Dim j As Integer
j = Cells(Rows.Count, 1).End(xlUp).Row
For i = 3 To j
Cells(i, 2).AlreadySigned()
Next i
End Function
但在第 6 行有一个eror: syntax eror。
【问题讨论】:
-
您到底想达到什么目的?我问的原因是因为我认为在这种情况下你不需要在函数内部调用函数......我感觉你可能不知道(无意冒犯)
Procedure和 @987654325 是什么@ 确实.. 所以请让我们知道您到底想达到什么目的...
标签: excel vba user-defined-functions