dcsimg
Results 1 to 5 of 5

Thread: Not remove reference for Excel while using Late-Bound in vb6

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2011
    Location
    Malaysia
    Posts
    5

    Question Not remove reference for Excel while using Late-Bound in vb6

    I have a question regarding the following (MOST EXCELLENT) thread by si_the_geek:

    http://www.vbforums.com/showthread.p...6-(or-VB5-VBA)

    Namely post #10, step 4) Remove "Excel object Library" from the list in "Project" -> "References"

    I have been using late binding in Excel for a few years now, but I missed step no 4) above. My reference is for Excel 2007. But I didn't recall of having too many issues for other versions in my clients computers. Even up to Excel 2016.

    My question is,

    1) Do I need to remove the reference, with not having too much issues for my clients

    2) Would it help if the user has Excel 64 bit in their machine

    Thank you

  2. #2
    PowerPoster
    Join Date
    Oct 2013
    Posts
    3,161

    Re: Not remove reference for Excel while using Late-Bound in vb6

    1. Doesn’t matter
    2. You can’t use Excel automation with Excel 64

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2011
    Location
    Malaysia
    Posts
    5

    Re: Not remove reference for Excel while using Late-Bound in vb6

    The first thing I realized after removing the reference is, I'm starting to get "Undefined errors". At which I need to supply the constants in a module. I wonder what was happening when the reference is not removed : No such undefined errors. Was it Late bound or Early bound. I never supplied the constants when distributing to clients with the reference not removed.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    19,069

    Re: Not remove reference for Excel while using Late-Bound in vb6

    Late binding is what you have when your object reference variables are Variant or Object, using GetObject()/CreateObject() to assign them instead of New.

    It has nothing to do with referencing the type library, and you can continue doing so in order to get those constant definitions.

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2011
    Location
    Malaysia
    Posts
    5

    Re: Not remove reference for Excel while using Late-Bound in vb6

    Problem resolved.

    Thank you so much for all the replies.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width