Can't find project or library error on Format function

abberyfarm

Well-known Member
Joined
Aug 14, 2011
Messages
733
Hi,

I have this code in a macro and it works on my laptop.

Code:
 Randomize
        c = Format(rnd(1), "#0.00")
        c = Round(rnd, 2)

However, when I try run it on my desktop I get an error 'Can't find project or library' with the 'Format' word highlighted.

Could anybody tell me how to find out which library is missing and how I activate it?

Thank you

also posted here http://www.ozgrid.com/forum/showthread.php?t=176680&p=655767#post655767
 
I know preceding with VBA will work but you shouldn't have to do that.

If there any checked references marked as MISSING then you should uncheck them, save the file, reopen it and try the code again.

Unchecked references really don't have anything to do with the problem and you can ignore.

As for MS adding something to check/update references, I've never heard of anything like that.

By the way, are you rewriting your code because it doesn't work in new versions?

If you are you shouldn't need to, in fact you should write the code so that it will work in the earliest version of Excel it will be used in.
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
However, code written for earlier versions of Excel will not always work in new versions. There are a few calls and declarations in 32bit code which must be rewritten for 64bit execution.
 
Upvote 0

Forum statistics

Threads
1,221,614
Messages
6,160,838
Members
451,672
Latest member
LexCie

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