【发布时间】:2021-07-29 20:16:45
【问题描述】:
我想在 VBA 中另一个模块的 Excel 工作表中使用一个函数。 但是我不知道为什么下面的代码会导致错误。
在工作表“项目”中:
Public Function get_value() As String
get_value = aBox.Value 'aBox is a text box in the sheet
End Function
在另一个模块中:
Function hoge(proj As Worksheet) As String
Dim name as string
name = proj.get_value() 'This causes an error "method or data member not found"
有什么建议吗?
【问题讨论】: