Results 1 to 5 of 5

Catch non-existent dll compile errors

Threaded View

likestheaction Catch non-existent dll... 01-07-2009, 08:10 PM
shg Can't you just put On Error... 01-07-2009, 08:12 PM
likestheaction Thanks. I will try the late... 01-09-2009, 05:12 PM
shg Don't you still get a compile... 01-09-2009, 05:18 PM
Leith Ross Hello likestheaction, Here... 01-10-2009, 08:07 PM
  1. #1
    Registered User
    Join Date
    01-07-2009
    Location
    Pittsburgh, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Catch non-existent dll compile errors

    I have created a dll in .NET that i use it in excel. End users who use the excel workbook need to register the dll when they first use the workbook. Sometimes, they fail to register the dll and launch the workbook. The workbook has a reference in it to the .dll. As soon as they try to do anything they get a compile error "User-defined type not defined". This is because:
    Dim data
    Set data = New unit.Units
    and the "unit.dll" has not been registered to work with excel.

    What i want to do is to catch and interrupt the compile error gracefully and tell the user to go back and re-register the dll before using the workbook. As it stands now they just see compile error - and well you can imagine when they are looking at the vb screen quite confused.

    So i thought maybe i would create a type
    Type unit
    End Type
    but you can't have a type without members. And i'm not sure how this would work once someone registers the user-defined type by the same name.

    So - any ideas how to solve this problem?

    Thanks,

    -lta
    Last edited by likestheaction; 01-09-2009 at 05:08 PM.

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