ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VBA Error Message "Compile Error...." (https://www.excelbanter.com/excel-discussion-misc-queries/35404-vba-error-message-%22compile-error-%22.html)

Steve

VBA Error Message "Compile Error...."
 
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

Ron de Bruin

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

--
Regards Ron de Bruin
http://www.rondebruin.nl


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




Steve

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

"Ron de Bruin" wrote:

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

--
Regards Ron de Bruin
http://www.rondebruin.nl


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





Ron de Bruin

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



--
Regards Ron de Bruin
http://www.rondebruin.nl


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

"Ron de Bruin" wrote:

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

--
Regards Ron de Bruin
http://www.rondebruin.nl


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








All times are GMT +1. The time now is 09:28 PM.

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