Outlook 2000 code won't run under Outlook 2003?

G

Guest

Hi, I have some code that extracts data from a daily newswire. It won't
runnow I have OL 2003. Having striped it down the Left() function reports a
Project is missing.

The following test VBA code:

Sub TextTest()
Dim strEuroValue, strLeftBit As String
strLeftBit = "StartValue"

On Error Resume Next

strEuroValue = "qwerty"
strLeftBit = Left(strEuroValue, 3)
MsgBox strLeftBit

End Sub

creates a "Compile Error Can't find Project or Library.

Surely Left still works, it's there in the Help file.

Any help much appreciated.
Debbie M
 
M

Michael Bauer

Hi Debbie,

the Left function is contained in the MSVBVM60.DLL (Visual Basic for
Applicationis) which can´t be de-selected AFAIK.

Did you check the References dialog already (Extras/References)?
 
G

Guest

Michael
thank you for the response.
When I select the 'Left' command and press F1 I get the same "Can't find
project or library" error and if I 'OK' I then get a dialogue box that shows
ticks (check marks) against the following items:
Visual Basic for Applications
Microsoft Outlook 11.0 Object Library
OLE Automation
Microsoft Office 11.0 Object Library
Microsoft Forms 2.0 Object Library
Microsoft Excel 5.0 Object Library
MISSING: Help Systems Services 1.0 Type Library
Microsoft Visual Basic for Applications Extensibility 5.3 Library
Common Language Runtime Execution Engine 1.0 Library

I note that one reports "Missing". It doesn't seem directly relevant being
related to help (Help Systems Services 1.0 Type Library) but how do I get
this unMissing?

Thanks again
Debbie.
 
W

Wolfram Jahn

Debbie said:
I note that one reports "Missing". It doesn't seem directly relevant being
related to help (Help Systems Services 1.0 Type Library) but how do I get
this unMissing?

Did you try the Windows Standard Magic of an Uninstall/Reinstall cycle?

Just guessing,


Wolfram
 
G

Guest

Wolfram

er, no, not yet, though your suggestion has merit. :)

What I did notice after re-reading Michael's comments was that there were
serveral VB Applications code libraries listed and the DLL that Michael
refered to wan't selected.

So I selected it. Nothing changed.
Restart Outlook, I thought.
And nothing changed. I went back into the References dialog and it was back
as before.
Repeated loop in case I'd Cancelled instead of saving and same answer.

I can't see what DLL is being used by default as it scrolls off the dialog
box display and like other situations where this is the case you can't select
it and copy it to elsewhere where you can read it! (Thank you, Microsoft!)

I'm worried if I reinstall all my configs/shortcut/etc will be lost but it's
beginning to look inevitable :(

Thanks
Debbie
 
M

Michael Bauer

You could try to install VBA again. Therefor please insert your
Office-CD and click Install/Remove Features. Search for the VBA entry.
If it´s selected then remove it, update Office, then start once more
again, select the item, and update again.
 
G

Guest

Michael

I've removed VBA and reinstalled it again as you suggest.
The configuration and behaviour is unchanged.

In the References dialogue box the Visual Basic for Applications is the
first reference and checked and points to a file which shows:

C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VB......
I can't read the rest of the line, it's truncated but within the VBA6
directory there are the following files from which to choose:

20/06/2005 09:10 <DIR> 1033
25/08/1998 21:08 466,944 VBACV10.DLL
25/08/1998 21:08 471,040 VBACV10D.DLL
25/08/1998 21:09 1,044,480 VBACV20.DLL
03/07/2003 16:19 2,502,656 VBE6.DLL
03/07/2003 15:31 45,056 VBE6EXT.OLB

within the 1033 Directory there is one DLL:
25/10/2002 16:37 159,744 VBE6INTL.DLL

Which one Outlook is trying to use I don't know but it must be one of those.

There are SIX other references to Visual Basic for Applications in the
References dialogue that are UNchecked. As I reported yesterday when I check
them, they revert to unchecked. These refernces point to the following files:

C:\WINDOWS\SYSTEM32\MSVBVM60.DLL
C:\WINDOWS\SYSTEM32\VBAEND32.OLB
C:\WINDOWS\SYSTEM32\msvbvm50.dll
C:\WINDOWS\SYSTEM32\VBAEN32.OLB
C:\Program Files\Common Files\Microsoft Shared\VBA\VBA332.DLL
C:\WINDOWS\SYSTEM32\VEN2232.OLB

Is this correct/Normal?
Should any of these be Checked (you suggest the 'code' I need is in the
"MSVBVM60.DLL"). If I try to check the VB for A that relates to MSVBVM60.DLL
it reports a conflict (I assume becase one VBA reference is already
selected). If I try to uncheck the existing reference it reports that I can't
so that as it's in use..

Any suggestions before I try to find my SuperCalc for MS DOS disks :)

Many thanks
Debbie M

-=-=-=-=-=-=-=-=-=-=-=-=-
 
G

Guest

Michael
further to my earlier reply, I also noticed a reference to the Object
Browser in other postings so I had a look at that.

I found Left (as I need it, I think) under VBA (not surprising).

If I right click on the Member 'Left' for Class 'Strings' I get a References
option. This brings up the References Dialogue box with the following entry
highligted:

Common Language Runtime Ececution Engine 1.0 Library

that shows a file reference of:

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscoree.tlb

Is this the home of the String 'Left' Function?
Is the highlight enrty relevant and significant or is VBA being random?
If it's there why can't I use it?

-=-=-=-=-=-=-=-=-=-
 
M

Michael Bednarek

Hi, I have some code that extracts data from a daily newswire. It won't
runnow I have OL 2003. Having striped it down the Left() function reports a
Project is missing.
[snip]

This seems to happen quite a lot when VBA code is used under different
Office applications, not just Outlook.

In the VBE, go to Tools/References; note the MISSING references and
untick them; exit (OK) the dialogue. Open that dialogue again; are there
still references listed as MISSING? If yes, you have to find them
through the Browse... button on your system. If not, your code should
now compile (Debug/Compile) and run.

Another approach would to prefix the function Left() with VBA. as in
VBA.Left(strString,lngLength).
 
M

Michael Bauer

Debbie,

if a function is available in more than one library, which your project
references on, then the top most one from the references dialog will be
taken.

As the other Michael suggested, full qualifying the function with
VBA.Left should do it.
 
G

Guest

Michael & Michael,
thank you so much for your advice and help. I couldn't find the 'Help' DLL
that was reported as missing so I unchecked the reference and now it all
works!!

I'm so happy. Sad, I know but Outlook gets you like that.

Debbie

Michael Bednarek said:
Hi, I have some code that extracts data from a daily newswire. It won't
runnow I have OL 2003. Having striped it down the Left() function reports a
Project is missing.
[snip]

This seems to happen quite a lot when VBA code is used under different
Office applications, not just Outlook.

In the VBE, go to Tools/References; note the MISSING references and
untick them; exit (OK) the dialogue. Open that dialogue again; are there
still references listed as MISSING? If yes, you have to find them
through the Browse... button on your system. If not, your code should
now compile (Debug/Compile) and run.

Another approach would to prefix the function Left() with VBA. as in
VBA.Left(strString,lngLength).
 

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