Use late binding to get at the FORMS library

Discussion in 'Microsoft Excel Programming' started by xp, Mar 25, 2009.

  1. xp

    xp Guest

    Using Excel 2007;

    I'm trying to use late binding to create a reference to the Forms library so
    I don't have to reference it in my code. The following does NOT work:

    Dim oData As Object
    Set oData = CreateObject("MSForms.DataObject")

    Can someone please correct the above form me so I can get at the
    "DataObject" library?

    Thanks.
     
    xp, Mar 25, 2009
    #1
    1. Advertisements

  2. xp,

    There is a discussion here that may be of use:

    http://www.mrexcel.com/forum/showthread.php?t=192500

    HTH,
    Bernie
    MS Excel MVP


    "xp" <> wrote in message
    news:...
    > Using Excel 2007;
    >
    > I'm trying to use late binding to create a reference to the Forms library so
    > I don't have to reference it in my code. The following does NOT work:
    >
    > Dim oData As Object
    > Set oData = CreateObject("MSForms.DataObject")
    >
    > Can someone please correct the above form me so I can get at the
    > "DataObject" library?
    >
    > Thanks.
     
    Bernie Deitrick, Mar 25, 2009
    #2
    1. Advertisements

  3. xp

    xp Guest

    I guess the ultimate answer is, you can't use late binding with "DataObject"
    so it's impossible; since it's not an ActiveX component.

    Thanks for the reference.



    "Bernie Deitrick" wrote:

    > xp,
    >
    > There is a discussion here that may be of use:
    >
    > http://www.mrexcel.com/forum/showthread.php?t=192500
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "xp" <> wrote in message
    > news:...
    > > Using Excel 2007;
    > >
    > > I'm trying to use late binding to create a reference to the Forms library so
    > > I don't have to reference it in my code. The following does NOT work:
    > >
    > > Dim oData As Object
    > > Set oData = CreateObject("MSForms.DataObject")
    > >
    > > Can someone please correct the above form me so I can get at the
    > > "DataObject" library?
    > >
    > > Thanks.

    >
    >
    >
     
    xp, Mar 25, 2009
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page