返回列表 上一主題 發帖

[發問] 動態新增 UserForm 及 CommandButton 後 如何寫click的動作?

回復 8# Hsieh


    想請問 在新增CommandButton 之後

    這邊是新增Button的按鈕事件嗎?
    With .CodeModule '在表單模組內新增程序
      .InsertLines 1, "Private Sub UserForm_Initialize()"
      .InsertLines 2, "MyList1.List=array(1,2,3,4,5,6,7,8,9)"
      .InsertLines 3, "Set obj.MyBut = Controls(""Move_Data"")" '將按鈕加入物件類別
      .InsertLines 4, "End Sub"
    End With

   那除了這個方法外能用其他的方法去新增按鈕的事件?

TOP

        靜思自在 : 能善用時間的人,必能掌握自己努力的方向。
返回列表 上一主題