Error in VB in Design Mode Only 
Author Message
 Error in VB in Design Mode Only

In VB 6, why do I get an the error "An error was
encountered while handling the data. Object doesn't
support this property or method. Error loading the list of
Committees." I only get the error when running in "design"
mode. When I run the .dll seperatley, I don't get an
error. The code dynamically creates the controls on a form
and I get the error on a ListBox that has
it's "multiselect" property set to true and then sends the
control to a function embedded in another .ddl to process.
If I turn off the multiselect, then the code works fine in
design mode. It seems like the called .dll can't handle
the control. The function use to be in a class module
within the same project. Now that class module has been
made into a .dll and that's when the problem started.


Mon, 04 Oct 2004 10:05:35 GMT  
 Error in VB in Design Mode Only
Is this anything like what you've done?
(This worked for me...)

List1(0) has multiselect = 2

Project 1 : Form1

    Option Explicit

    Private Sub Form_Load()

        Dim x As ListBox

        Load List1(1)
        Set x = List1(1)

        x.Move 100, 100, 1000, 1000
        x.AddItem "Dennis"
        x.AddItem "Dennis"
        x.AddItem "Dennis"
        x.Visible = True

        Dim y As Project2.Class1
        Set y = New Class1

        Debug.Print y.ReturnItems(x)(0)

    End Sub

Project2 : Class1

    Option Explicit

    Public Function ReturnItems(lst As Object) As Variant

    Dim i%, Items() As String

        ReDim Items(lst.ListCount - 1) As String

        For i = 0 To lst.ListCount - 1
            Items(i) = lst.List(i)
        Next i

        ReturnItems = Items

    End Function

D?

| In VB 6, why do I get an the error "An error was
| encountered while handling the data. Object doesn't
| support this property or method. Error loading the list of
| Committees." I only get the error when running in "design"
| mode. When I run the .dll seperatley, I don't get an
| error. The code dynamically creates the controls on a form
| and I get the error on a ListBox that has
| it's "multiselect" property set to true and then sends the
| control to a function embedded in another .ddl to process.
| If I turn off the multiselect, then the code works fine in
| design mode. It seems like the called .dll can't handle
| the control. The function use to be in a class module
| within the same project. Now that class module has been
| made into a .dll and that's when the problem started.



Mon, 04 Oct 2004 13:23:26 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. MainMenu does not show in design mode when Form1.vb[Design] has focus

2. Browser Control: Design Mode vs Compiled Mode

3. change from running mode to design mode

4. Please Help......Design mode Vs. Run mode detection

5. Browser Control: Design Mode vs Compiled Mode

6. Kernel error in design mode

7. KERNEL error in design mode - HELP!!!

8. VBE in User Designed Control Design Mode

9. KERNEL error in design mode - HELP!!!

10. VB3/Win3.1 Conflicts with HP Deskjet 820Cxi in VB design Mode

11. Debug VB DLL (Design Mode) with ASP/IIS 5.0

12. Debug VB DLL (Design Mode) with ASP/IIS 5.0

 

 
Powered by phpBB® Forum Software