backfromthebush
New Member
- Joined
- Jul 2, 2010
- Messages
- 37
Hi all,
I have an Excel spreadsheet which has an option to send certain data from it via an email in Outlook simply by clicking a user form button.
I have set the Library Reference to "Microsoft Outlook 15.0" and tested the code and all works OK. I have three questions though:-
1. If I send this Excel file to other users, will the Object Reference remain, or will they need to go into the VBA module and re-select it?
2. Is there an easy way to automatically select this Object Reference using VBA code?
3. If one of the spreadsheet users does not have access to Outlook (yes we have a few of these!!), is there a way to include some code that would exit the procedure (and maybe with a pop up message advising that Outlook isn't available?
I also tested the code to run without the Outlook 15.0 selected, and tried to put an error handler in. I received a Compile Error: user defined type not defined (from the code: dim olApp As New Outlook.Application) - so I assume you can't put an error handler on errors occuring when declaring variables??
Thanks in advance!!
I have an Excel spreadsheet which has an option to send certain data from it via an email in Outlook simply by clicking a user form button.
I have set the Library Reference to "Microsoft Outlook 15.0" and tested the code and all works OK. I have three questions though:-
1. If I send this Excel file to other users, will the Object Reference remain, or will they need to go into the VBA module and re-select it?
2. Is there an easy way to automatically select this Object Reference using VBA code?
3. If one of the spreadsheet users does not have access to Outlook (yes we have a few of these!!), is there a way to include some code that would exit the procedure (and maybe with a pop up message advising that Outlook isn't available?
I also tested the code to run without the Outlook 15.0 selected, and tried to put an error handler in. I received a Compile Error: user defined type not defined (from the code: dim olApp As New Outlook.Application) - so I assume you can't put an error handler on errors occuring when declaring variables??
Thanks in advance!!