Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Running macro with different references

I wrote a macro on my PC about 4 months ago. Now it is being used by someone
else on a different PC. It still runs just fine for me on my PC, but not on
her PC. I checked her references and am wondering if it would make a
difference that her office, excel and word are 10.0 object libraries and
mine are 11.0? Could this be what's causing it to run weird on her PC?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Running macro with different references

I looked for that piece of code and it's not in there. My macro merges data
from the worksheet onto word documents, don't know if this changes anything.
By weird I mean it's printing duplicate documents and printing things that
aren't supposed to print, that sort of thing.
"Jim Thomlinson" wrote in message
...
If you recorded a macro in XL 11 and try to run it on 10 there could be
some
issues with backwards compatibility. Most likely (just a guess here but
something to look for) is that you macro performs a sort at some point. In
XL
11 a new parameter was added to the sort functionallity
"DataOption1:=xlSortNormal". Just remove that piece and the code will
probably run OK on the other system.
--
HTH...

Jim Thomlinson


"Michelle Hanan" wrote:

I wrote a macro on my PC about 4 months ago. Now it is being used by
someone
else on a different PC. It still runs just fine for me on my PC, but not
on
her PC. I checked her references and am wondering if it would make a
difference that her office, excel and word are 10.0 object libraries and
mine are 11.0? Could this be what's causing it to run weird on her PC?





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Running macro with different references

I do reference to word 11.0. I also use late binding already in my code.
?
"Jim Thomlinson" wrote in message
...
Do you explicitly create a refernce to Word (in the VBE tools -
references
- microsoft Word 11.0) if so then you should remove that reference from
your
spread sheet and change your code to late binding...

Change (early binding)
dim appWord as Word.Application

to (late binding)
dim appWord as object

Set appWord = CreateObject("Word.Application")
--
HTH...

Jim Thomlinson


"Michelle Hanan" wrote:

I looked for that piece of code and it's not in there. My macro merges
data
from the worksheet onto word documents, don't know if this changes
anything.
By weird I mean it's printing duplicate documents and printing things
that
aren't supposed to print, that sort of thing.
"Jim Thomlinson" wrote in
message
...
If you recorded a macro in XL 11 and try to run it on 10 there could be
some
issues with backwards compatibility. Most likely (just a guess here but
something to look for) is that you macro performs a sort at some point.
In
XL
11 a new parameter was added to the sort functionallity
"DataOption1:=xlSortNormal". Just remove that piece and the code will
probably run OK on the other system.
--
HTH...

Jim Thomlinson


"Michelle Hanan" wrote:

I wrote a macro on my PC about 4 months ago. Now it is being used by
someone
else on a different PC. It still runs just fine for me on my PC, but
not
on
her PC. I checked her references and am wondering if it would make a
difference that her office, excel and word are 10.0 object libraries
and
mine are 11.0? Could this be what's causing it to run weird on her PC?








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
Disable running of SelectionChange macro when in another macro? Tonso Excel Discussion (Misc queries) 6 March 21st 10 06:50 PM
Excel remains running due to held references Fredrik Excel Programming 3 November 5th 06 02:34 PM
disable user running macro from Tools Macro Steve Simons Excel Discussion (Misc queries) 4 September 28th 06 06:28 AM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
Launch Macro in Access via Macro running in Excel??? dgrant Excel Programming 1 September 24th 03 01:38 PM


All times are GMT +1. The time now is 07:40 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"