VBA - Cannot find project or library

G

Goodenuff

Hi guys, I suddenly have a wierd problem. Some VBA code (6.5) that works on
my computer fails when the macro runs on another machine???
There is a simple built in function I'm using (Format) that doesn't want to
run.
"FollowUpCalendar.Calendar = Format(Date, "dd mmm yy")"
I've looked under "References - VBAProject and all normal boxes are ticked???

Can anyone please point me in the right direction?

Regards,

Ian
 
D

Dave Peterson

Open the workbook with the problem (on the problem PC)
Go into the VBE
Select that workbook's project
Click on Tools|References, look for a MISSING reference.

Delete it or replace it with one that you need.

Missing references can cause errors that have no relationship to the line that's
marked as error.
 
P

Peter T

When you checked references was that on your system or on the one that
fails. What you describe is highly indicative of a missing reference,
indicated by MISSING. Possible reasons are code was compiled with one or
more of the ref's being newer than in the system that fails, first thing I'd
look at is that Calendar control.

As a temporary fix try prefixing 'Format' and any other string functions
that fail like this -

VBA.Strings.Format(...

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top