Answered by:
This code is wrong?

Question
-
Public WithEvents OleCustomName As MSForms.TextBox
Public WithEvents OleCustomList As MSForms.ListBoxPublic 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 Withend sub
- Moved by Jie Bao Tuesday, April 10, 2012 6:41 AM (From:Visual Basic General)
Wednesday, April 4, 2012 5:00 AM
Answers
-
i use vb6
As this forum is for VB.NET only, please read this post: http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6a0719fe-14af-47f7-9f51-a8ea2b9c8d6b
Hannes
If you have got questions about this, just ask.
In a perfect world,
users would never enter data in the wrong form,
files they choose to open would always exist
and code would never have bugs.
C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/- Edited by Heslacher Wednesday, April 4, 2012 7:17 AM
- Proposed as answer by Devon_Nullman Thursday, April 5, 2012 5:04 AM
- Marked as answer by Mr. Wharty Thursday, May 31, 2012 6:45 AM
Wednesday, April 4, 2012 7:16 AM
All replies
-
I see a mix of vintage VB and current VB mixed in each other.
Which VB version are you using?
Success
CorWednesday, April 4, 2012 6:04 AM -
i use vb6Wednesday, April 4, 2012 7:12 AM
-
i use vb6
As this forum is for VB.NET only, please read this post: http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6a0719fe-14af-47f7-9f51-a8ea2b9c8d6b
Hannes
If you have got questions about this, just ask.
In a perfect world,
users would never enter data in the wrong form,
files they choose to open would always exist
and code would never have bugs.
C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/- Edited by Heslacher Wednesday, April 4, 2012 7:17 AM
- Proposed as answer by Devon_Nullman Thursday, April 5, 2012 5:04 AM
- Marked as answer by Mr. Wharty Thursday, May 31, 2012 6:45 AM
Wednesday, April 4, 2012 7:16 AM