Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Macro references

The problem probably stems from the fact that you have a later version of
Word/Outlook than the users.

Solution 1: do you have a copy of the same version, and can you build the
macros in that version?

Solution 2: have you heard of late binding. Late binding binds to the object
library at run time, not at compile time, so it will pick up whatever
library that they have. You have to code differently, for instance, instead
of

Dim olApp As Outlook.Application

Set olApp = New Outlook.Application

you would use

Dim olApp As Object

Set olApp = CreateObject("Outlook.Application")

it also means that you cannot use application constants, you have to hard
code them. I have written a small paper on a technique, written for Outlook
but the technique is generic, which you can read at
http://xldynamic.com/source/xld.EarlyLate.html

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Dave Shaw" wrote in message
...
I'm tearing my hair out here. I have an Excel Template containing macros
which do things using word and outlook. I have therefore added the
relevant
references.

When a user creates a new file using the template and a macro is run the
message "can't find project of library" occurs. The references seem to be
there but the problem occurs on every line.

Can anyone tell me how to rectify this? it is not feasible to make
adjustments to individual's machines.

thanks in advance





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
Macro using relative references warp9 Excel Worksheet Functions 5 October 21st 08 04:21 AM
Macro to Formula References K1KKKA Excel Discussion (Misc queries) 4 December 18th 06 10:27 PM
Macro without cell references...... Winnie_Shrub Excel Discussion (Misc queries) 1 June 28th 06 09:09 AM
Confusing Macro and references.... ween_boy Excel Programming 0 December 2nd 05 06:28 PM
macro vba relative references aut1jlt Excel Worksheet Functions 0 April 20th 05 06:13 PM


All times are GMT +1. The time now is 07:58 AM.

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

About Us

"It's about Microsoft Excel"