VBA编译错误“无效使用财产”

时间:2014-01-14 14:17:59

标签: vba compiler-errors

我得到"无效使用财产"这里函数标题行出错:

Public Function process_station(ByVal station_id As String) As StationData
'Take a station id and return a StationData object with all of its tags from the server
    Dim curStation As New StationData: curStation.init_station station_id
    Dim srvTags As PointList: Set srvTags = srv.GetPoints("Tag = '*" & station_id & "*'")
    Dim curTag As TagString
    For Each t In srvTags
        Set curTag = New TagString: curTag.Data t.PathName
        curStation.addTag curTag
    Next t
    Set process_station = curStation
End Function

StationData是一个自定义类,在其他任何地方都没有问题。我是否错误地设置了此功能?我假设引用函数头的编译错误意味着问题不在实际的功能块内,如果不正确,我会解释剩下的代码。

此函数由另一个使用DataHandler.process_station的模块调用。 DataHandler是它所在的模块。

0 个答案:

没有答案