I'v added a control dynamically, and now I want to place
the control in a collection. I'm getting the error
"Object variable or With block variable not set" on the bold line:
Private WithEvents ctlExtender As VBControlExtender
Private Headers As Collection
Public Function AddGroup(Caption As String) As Object
Dim sName As String
Dim iGroup As Integer
iTotHeaders = iTotHeaders + 1
sName = "Header" + LTrim(Str(iTotHeaders))
Set ctlExtender = Controls.Add("SuperSideBar.crlButton", sName)
With ctlExtender
.Alignment = 1
.Caption = Caption
.Left = 10
.Top = 10
.Width = UserControl.Width - 23
.Visible = True
End With
Headers.Add ctlExtender, sName
Set AddGroup = ctlExtender
End Function
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people