Invalid Procedure

K

kldempsey

I've recently taken over macros and the person's machine they wer
developed on works great, however when I try to run the macros on m
machine or someone elses I get an invalid procedure on the InsertLine
command. This code works fine on the developers machine. I checke
the tools-references and we're using the same dlls as far as I ca
tell. We are in a common desktop environment. Where else can
compare our machine's setup? Thanks for any ideas
 
F

ForSale

At my work, everyone has basically the same machines, however, we hav
XP, 2000 and another version of 2000. i've noticed that if we shar
very large workbooks with lots and lots of codes between any of thes
three, some of the codes won't work. haven't noticed if we get th
error message that you are, but maybe you could make sure that you ar
both on the same version of Excel/VBA.
good luc
 
D

David Adamson

The origninal developer sounds as bad as me.

The problem is that the developer probably didn't declare all the varaibles
that were used.

It is something that I have learn't the hard way.

Make sure all variables are declared properly (use the "option explicit") to
help you.

Once in the VBE window use "Tools", "Options", "Editor", "Require Varaible
Declaration".
 
Top