函数无返回不起作用

我有一个调用函数的macros:

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 

但是当它到达这个函数时,它返回错误的用户定义types没有定义

任何想法为什么?

你的函数中有一个错字(虽然它不会返回任何可能是子的)参数。

equipamentos As interger应该是equipamentos As Integer