Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default macro to select reference in tools--references

Can I write a macro to select a particular reference in
"Tools---References---...." I have a system where excel userform and access
database is used, and not all users have access on their machines.
To make this system work I have to select "Tools--References--Microsoft
Access 12.0 Object Library" and as access is installed in all machines, Users
get "Missing" in front of access reference and hence cannot use the userform.
NOTE: access is not involved in the system until later. There are 3 steps in
this sysetm: 1--2--3
1: users input their data into userform and click submit
2: once users click submit I get an email as an excel attachment with their
data
3: In that email attachment I have an "Accept" button, Once I hit accept
then it populates in access.

Please Help

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default macro to select reference in tools--references

Another option is to use late binding and eschew the reference to Access
completely.

You'll be able to check to see if Access is installed and process accordingly.

Some references:

http://support.microsoft.com/default...b;EN-US;244167
INFO: Writing Automation Clients for Multiple Office Versions

http://support.microsoft.com/default...b;en-us;245115
INFO: Using Early Binding and Late Binding in Automation

http://support.microsoft.com/default...b;en-us;247579
INFO: Use DISPID Binding to Automate Office Applications Whenever Possible

and Dick Kusleika has a web page at:
http://www.dicks-clicks.com/excel/olBinding.htm
that explains this with Outlook

==========
I'd develop with the references so that I could get the benefit of the
intellisense and autocomplete within the VBE, but then change to late binding
before sharing with others.



sam wrote:

Can I write a macro to select a particular reference in
"Tools---References---...." I have a system where excel userform and access
database is used, and not all users have access on their machines.
To make this system work I have to select "Tools--References--Microsoft
Access 12.0 Object Library" and as access is installed in all machines, Users
get "Missing" in front of access reference and hence cannot use the userform.
NOTE: access is not involved in the system until later. There are 3 steps in
this sysetm: 1--2--3
1: users input their data into userform and click submit
2: once users click submit I get an email as an excel attachment with their
data
3: In that email attachment I have an "Accept" button, Once I hit accept
then it populates in access.

Please Help

Thanks in advance.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 915
Default macro to select reference in tools--references

sam wrote:
Can I write a macro to select a particular reference in
"Tools---References---...." I have a system where excel userform and access
database is used, and not all users have access on their machines.
To make this system work I have to select "Tools--References--Microsoft
Access 12.0 Object Library" and as access is installed in all machines, Users
get "Missing" in front of access reference and hence cannot use the userform.
NOTE: access is not involved in the system until later. There are 3 steps in
this sysetm: 1--2--3
1: users input their data into userform and click submit
2: once users click submit I get an email as an excel attachment with their
data
3: In that email attachment I have an "Accept" button, Once I hit accept
then it populates in access.

Please Help

Thanks in advance.


This is not a specific answer, but I think you would benefit from
studying the concepts of early- and late-binding, and how to code an
application that requires late binding.

Googling this:
vba early late binding how to detect reference
places excellent reading material at the top.

Hope this helps!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How remove invalid references in ToolsReferences drop down box? [email protected] Excel Programming 1 July 7th 09 09:52 AM
Tools - References Michelle Excel Programming 8 June 13th 08 07:18 PM
Tools...References shows "MISSING:" in front of 2 references Mike Jamesson Excel Programming 1 October 19th 05 06:33 PM
Remove "Missing" reference in VB-Tools-References Alan Excel Programming 1 December 21st 04 03:37 AM
Tools | References - information about references L Mehl Excel Programming 6 July 4th 04 06:28 PM


All times are GMT +1. The time now is 10:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"