+ Reply to Thread
Results 1 to 2 of 2

Conversion from early binding to late binding

  1. #1
    Registered User
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Conversion from early binding to late binding

    Hi again,

    I am developing an EXCEL/VBA application which I intend to distribute (sell) to unknown clients. The present version (with early binding) is working perfectly. However, when I tested it on a different computer I got the infamous error message "Can't find project or library" (caused surprisingly by the Trim function). A recommended solution to the problem is to convert the code to late binding but I got an error at the very beginning. I am not an expert in VBA and I might be missing something basic. Here is the code:

    Please Login or Register  to view this content.
    When I run it in the above form I get Run time error 91 "Object variable or With block variable not set" for the line

    Please Login or Register  to view this content.
    When I replace this line with the line below it (replacing xlapp explicitly with Excel.Application), do the same for the second worksheet and use xlsh1 and xlsh2 as range qualifiers the module runs as expected with no errors.

    Any ideas?

  2. #2
    Registered User
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Conversion from early binding to late binding

    Sorry, last sentence should read:

    When I replace this line with the line below it (replacing xlapp explicitly with Excel.Application), do the same for the second worksheet and use xlws1 and xlws2 as range qualifiers the module runs as expected with no errors.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1