Missing Object in Library

huntmc

New Member
Joined
Aug 17, 2004
Messages
18
I developed this macro in Excel 97 and then upgraded to Excel 2003. It worked fine in my Excel 97 but now i get an error message saying "Compile Error: Can't find project or Library" when i execute the code. Can someone help me understand what i need to do to fix this so it works on my Excel 2003. My code is using an array to delete duplicate entries out of a combo box list.

i believe the line of code having the problem is If Err.Number = 0 And Trim(c) <> "" Then. I have included the whole module below so you can evaluate for yourself.

Code:
'array to get rid of duplicates in cmbShort

Function CreateArray(r As Range)
    Dim col As New Collection, c As Range, TempArray(), i As Long
    
    'for each cell in range r
    For Each c In r
        On Error Resume Next
        col.Add c.Value, CStr(c.Value)
        If Err.Number = 0 And Trim(c) <> "" Then
            ReDim Preserve TempArray(i)
            TempArray(i) = c.Value
            i = i + 1
        End If
        Err.Clear
    Next

    CreateArray = TempArray
    Erase TempArray

End Function
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Have a look under Tools>References..., is there anything with MISSING?
 
Upvote 0
Yes... it says its missing "Microsoft Outlook 8.0 object library". Where can i go to download this?
 
Upvote 0
Just uncheck it, if you actually need this library then you probably need a later version anyway.

I'm running Office 2000 and the version is 9.0, if your using Office 2003 then it's probably a later version than that.

If you really do need the library, scroll down and select it.
 
Upvote 0
New issue with VBIDE = VBE6EXT not referenced

OK... i got beyond that problem, but now when i open the workbook i get an error saying "Error Referencing VBIDE = VBE6EXT.olb" I went to the Tools > Reference and added this as a reference but it still appears when i start the workbook. any suggestions?
 
Upvote 0
Delete any references that you don't need. Go lean, the two defaults, OLE, MS Office Object library x.x and MS VBA Extensibility x.x. only one of each.

If their are more than one do the highest version only.

Then re-run the code and add only the references that may help.
 
Upvote 0
If you still recieve errors after following the above instructions, do the following.

Change:
If Err.Number = 0 And Trim(c) <> "" Then
To:
If Err.Number = 0 And VBA.Strings.Trim(c) <> "" Then
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,255
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top