VBA Error Message "Compile Error...."

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I used a macro from Ron's website to mail each worksheet to the email
address in cell a1. I ran this macro and it worked perfectly for one
workbook BUT... when I tried to use it for another workbook I got the
follwing error message "Microsoft Visual Basic Compile Error Can't find
project or library Ok Help".

Help me please... do I have to check some more references in the VBA tools?

Thanks,

Steve
 
Hi Steve

Have you set the reference to Outlook in that other workbook also ?
You must do that in every workbook or you can use Late binding.
See my site for a example
 
Ron,

Please excuse the ignorance on my part..... when I click the Outlook 10.0
Object Library it says that it is missing... I am at a different computer
than the last time I ran this macro. Do I down load it from Microsoft?
Also, what and where do I find this "Late Binding"... what does it do and how
do I use it in this instance?

Thanks
 
Hi Steve

Possible problems

1)The other machine don't have Outlook
2)The other machine have a older Outlook version then you

You can create your workbook in the oldest verion it must work or use Late Binding
On every Outlook example page on my site you find a example how to use Late binding.

For example
http://www.rondebruin.nl/mail/folder3/smallmessage.htm

On the bottom of the page

If you need more help post back
 

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

Back
Top