ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA - Cannot find project or library (https://www.excelbanter.com/excel-programming/422515-vba-cannot-find-project-library.html)

Goodenuff

VBA - Cannot find project or library
 
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

Dave Peterson

VBA - Cannot find project or library
 
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.

Goodenuff wrote:

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


--

Dave Peterson

Peter T

VBA - Cannot find project or library
 
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

"Goodenuff" wrote in message
...
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





All times are GMT +1. The time now is 02:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com