虽然搜索得很彻底,但我没有通过属性将范围传递给userform。我得到了所需的错误对象。代码在userform内,参数prange是全局的。任何帮助将不胜感激。感谢。
Public Property Get MyRng() As Range
Set MyRng = r1
End Property
Public Property Set MyRng(ByRef prange As Range)
Set r1 = prange
End Property
答案 0 :(得分:2)
那应该是userform
中的代码SELECT ?movementName ?famousName ?peopleName ?influenceName
WHERE {
?m dc:subject <http://dbpedia.org/resource/Category:Art_movements> .
?m rdfs:label ?movementName .
FILTER(LANG(?movementName) = "en")
?m dbp:knownFor ?a .
?a rdfs:label ?famousName .
FILTER(LANG(?famousName) = "en")
?m dbp:movement ?b .
?b rdfs:label ?peopleName .
FILTER(LANG(?peopleName) = "en")
?m dbp:influencedBy ?d .
?d rdfs:label ?influenceName .
FILTER(LANG(?influenceName) = "en")
}'
只是一个简单的例子
Option Explicit
Dim mRng As Range
Public Property Get myRng() As Range
Set myRng = mRng
End Property
Public Property Set myRng(nRg As Range)
Set mRng = nRg
End Property