我有一个自己的类(ClassFoo),它有一个简单的属性(pName),我无法设置它,因为我总是得到错误......
Class Modules - ClassFoo
---
Public pName as String
Public Property Let Name(Value as String)
pName = Value
End Property
----
Somewhere else in the ModuleX
...
Dim Foo as ClassFoo
Foo.Name = "foo" <- throws error
Foo.pName = "foo" <- throws error
或者
With Foo
.pName = "foo" <- throws error
End With
我将“Instancing”类从“Private”更改为“PublicNotCreatable”(来回)但我仍然有同样的错误......
感谢您提前回复。
CS