Tag:

VBA错误:相同属性的属性过程的定义不一致,或者属性过程有一个可选参数

我有一个非常简单的类定义。 课表作者定义如下: Option Explicit 'Works off of the ActiveCell 'Helps you write data into the cells Private pCornerCell As String Public Property Get CornerCell() CornerCell = pCornerCell End Property Public Property Let CornerCell(Value As String) pCornerCell = Value Range(Value).Select End Property 我收到一个编译错误,我不明白。 属性过程的定义不一致,或者属性过程有一个可选参数。 我究竟做错了什么?

VBA Excel – 使用Get / Let属性将string数组传递给类变体types

我一直在寻找一个答案只是传递和返回一个string数组在VB模块。 以下是我的示例代码。 我不断收到错误“不能分配给arrays”上线 Orgs.pIDOrgList = ID 有什么想法吗? class级代码: 'Class COrgList Private m_vpIDOrgList() As Variant 'Public pGROrgList() As String Function getOrgList(Comp As String) As String() If Comp = "Gram Stain" Then getOrgList = m_pGROrgList ElseIf Comp = "Identification" Then getOrgList = m_pIDOrgList Else MsgBox "Incorrect Comp Name" End If End Function Public Property Get pIDOrgList() As […]