尝试在 VBA 中使用类时,我不断收到下标超出范围错误,可以在这里使用一些帮助!
这是课 -
Option Explicit
Private buildWs As String
Public Property Get affBuild() As String
affBuild = buildWs
End Property
Public Property Let affBuild(value As String)
buildWs = affBuild
End Property
Public Function activate()
Sheets(buildWs).activate
End Function
这是电话——
Sub SetWs()
Dim current As CBuildSheet
Set current = New CBuildSheet
current.affBuild = "Resource Entry"
current.activate
End Sub