如题,比如我要在一个类模块中用一个LABEL的类模块
private withevents label1 as label
但这样只有控件的事件格式
但label1不是一个对象
我应该怎么做

解决方案 »

  1.   

    做个函数咯
    public sub SetLabel(lbl as Label)
      set label1 = lbl
    end sub
      

  2.   

    //但label1不是一个对象
    我应该怎么做实例化
      

  3.   

    private labelcl as Label     '这儿又用不了NEW
    private withevents Label1 as LabelPrivate Sub Class_Initialize()
    set withevents=labelcl
    end subpublic property let Caption(Data as string)
    label1.caption=data
    end property
    public property get Caption()as string
    caption=label1.caption
    end property
    当设置和读取属性时出错,该怎么办