Results 1 to 5 of 5

Thread: [RESOLVED] Coerced late-bound type error

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2007
    Posts
    3

    Resolved [RESOLVED] Coerced late-bound type error

    I have two modules in my access vba project which are part of the problem.
    One module contains two types:
    =vb Code:
    1. Option Compare Database
    2. Option Explicit
    3.  
    4. Public Type CacheTblRow
    5.         RowItem() As String
    6. End Type
    7.  
    8. Public Type CacheTbl
    9.         Row() As CacheTblRow
    10.         Success As Boolean
    11.         FieldNamesOrdered() As String
    12. End Type

    I have a procedure in the other module that uses these types to declare variables, but when the code gets to these lines I get error:"Only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions". Below is my declaration in the 2nd module, in a procedure:

    vb Code:
    1. Dim Duplicate_Table As CacheTbl


    I really am not sure how to fix this. I have used a different type in my code ealier and that worked, but it was not a nested type.

    Any advice greatfully received.

    Rich
    Last edited by L0ngman; Apr 18th, 2007 at 04:05 PM.

  2. #2

  3. #3
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Coerced late-bound type error

    VBA questions are asked in the Application Deployment Forum???

  4. #4

    Thread Starter
    New Member
    Join Date
    Apr 2007
    Posts
    3

    Re: Coerced late-bound type error

    So am I supposed to move my post myself? , to "Office development" ?.

    Admin seemed to suggest it had been done by them, although i don't see it being moved, it's in the same section - "Classic vb".

  5. #5
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: [RESOLVED] Coerced late-bound type error

    No, you can't move it. That's what puzzled me that it seemed to be moved here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width