|
-
May 18th, 2001, 01:16 AM
#1
Thread Starter
Member
Setting listview.volumnheaders within the class
I try to add a column to listview.columnheaders from within the class, but VB would not allowed to do it.
Vb would not execute line : .ColumnHeaders.Add = "Testing"
There is error said : 'Object does not support this properties or method.'
It is very strange, because I have alredady reference it.
--Main Code---------------
Private Sub Form_Load()
Dim daftarSupplier as New ClassExample
Set daftarSupplier.ListView = ListView1
daftarSupplier.SetListViewProp
End Sub
--ClassExample Code-----------------
Public Property Set ListView(ByVal vData As Object)
Set mvarListView = vData
End Property
Public Property Get ListView() As Object
Set ListView = mvarListView
End Property
-------------------------------------------------
Public Sub SetListViewProp()
With mvarListView
.View = lvwReport
.LabelEdit = lvwManual
.GridLines = True
.FullRowSelect = True
.ColumnHeaders.Add = "Testing" --------> Error
.ColumnHeaders(1).Width = 200
End With
End Sub
-
May 18th, 2001, 02:15 AM
#2
Addicted Member
Insetead of
Code:
.ColumnHeaders.Add = "Testing"
use
Code:
.ColumnHeaders.Add "Testing"
-
May 18th, 2001, 04:32 AM
#3
Thread Starter
Member
Sorry,
It doesn't work, error says : 'type mismatch'
I have this problems on some other places on the class.
The funny thing is that, I can set the properties as shown on the code example, but it does not let me execute a method.
Have ever you experinced this problems before ?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|