0

我有一个调用函数的宏:

Function escreve_mapa(Row As Integer, LastColumn As Integer, equipamentos As interger, Abrangencia As String, medias)
    Dim cell As Range
    Dim colunas As Range
    Dim i As Integer
    Sheets("Mapa de sinais (tabela)").Select
    Cells(Row, "A").Value = Abrangencia
    Cells(Row, "B").Value = equipamentos
    Set cell = Range("C" & Row)
    Set colunas = Range(cell, cell.Offset(0, LastColumn - 3))
    i = 0
    For Each cell In colunas
        If medias(i, 1) > 0 Then
            cell.Value = Round(medias(i, 0) / medias(i, 1), 2)
        End If
        i = i + 1
    Next cell
End Function

但是当它到达这个函数时,它返回错误用户定义的类型未定义

知道为什么吗?

4

1 回答 1

3

您的函数中有一个错字(尽管它没有返回任何内容,它可能是一个子)参数。

equipamentos As interger应该equipamentos As Integer

于 2013-05-18T13:51:24.200 回答