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
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,219
Office Version
  1. 365
Platform
  1. Windows
Have a look under Tools>References..., is there anything with MISSING?
 

huntmc

New Member
Joined
Aug 17, 2004
Messages
18
Yes... it says its missing "Microsoft Outlook 8.0 object library". Where can i go to download this?
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,219
Office Version
  1. 365
Platform
  1. Windows
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.
 

huntmc

New Member
Joined
Aug 17, 2004
Messages
18

ADVERTISEMENT

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?
 

Joe Was

MrExcel MVP
Joined
Feb 19, 2002
Messages
7,539
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.
 
L

Legacy 98055

Guest
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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,153
Messages
5,600,022
Members
414,356
Latest member
death20

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
Top