locked
This code is wrong? RRS feed

  • Question

  • Public WithEvents OleCustomName As MSForms.TextBox
    Public WithEvents OleCustomList As MSForms.ListBox

    Public WithEvents Dtpk As MSComCtl2.DTPicker
    Public OleDtpk As OLEObject
     

    Public Sub xl_SheetSelectionChange(ByVal sh As Object, ByVal Target As Excel.Range)
     With xl.ActiveSheet
      Set OleCustomName = .OLEObjects("Textbox1").object
      Set OleCustomList = .OLEObjects("Listbox1").object
      Set OleDtpk = .OLEObjects.Item("DTPicker1")
      Set Dtpk = OleDtpk.object   'Why DTpick can't but textbox and listbox is ok?
    End With

     end sub

    • Moved by Jie Bao Tuesday, April 10, 2012 6:41 AM (From:Visual Basic General)
    Wednesday, April 4, 2012 5:00 AM

Answers

All replies