#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default VB Errors

Our department creates macros with VB (mostly in Excel)
and sends them to users across the country. Occasionaly,
we have users who have used these macros for months
without any problem and then all of sudden they get an
error message.

Most of these problems seem to occur with the Left and
Right commands. They work for a long period of time.
Then all of sudden there is an error. When we debug the
issue, the highlighted word is Left or Right. We have
begun using Mid instead and this doesn't seem to happen as
much.

(It also sometimes happens with "Cols". When we
substitute Range for Columns the issue doesn't seem to
happen as much also.)

Following is an example of code we have used for months
without any problem.

YR = IIf(Dorder = 2, Left(Dtext, 2), Right (Dtext,2))

All of sudden some, but not all, users have started
experiencing a "Compile Error: Wrong number of arguements
or invalid property assignment".

Has anybody experienced anything like this before? What
causes this issue? Does a different machine setup (e.g.,
version of Excel, etc.) have any affect?

Any information you can provide or if you can point us to
any reference material to resolve this would be
appreciated. Thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VB Errors

Usually this is because you have declared a variable using the function name
or declared a local function using a duplicate name.

--
Regards,
Tom Ogilvy

"Thomas" wrote in message
...
Our department creates macros with VB (mostly in Excel)
and sends them to users across the country. Occasionaly,
we have users who have used these macros for months
without any problem and then all of sudden they get an
error message.

Most of these problems seem to occur with the Left and
Right commands. They work for a long period of time.
Then all of sudden there is an error. When we debug the
issue, the highlighted word is Left or Right. We have
begun using Mid instead and this doesn't seem to happen as
much.

(It also sometimes happens with "Cols". When we
substitute Range for Columns the issue doesn't seem to
happen as much also.)

Following is an example of code we have used for months
without any problem.

YR = IIf(Dorder = 2, Left(Dtext, 2), Right (Dtext,2))

All of sudden some, but not all, users have started
experiencing a "Compile Error: Wrong number of arguements
or invalid property assignment".

Has anybody experienced anything like this before? What
causes this issue? Does a different machine setup (e.g.,
version of Excel, etc.) have any affect?

Any information you can provide or if you can point us to
any reference material to resolve this would be
appreciated. Thanks for the help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default VB Errors

This problem often occurs when a reference is lost to a library file.

The solution is to go into each of the machines where the problem occurs, in
the VBE go to the ToolsReferences menu, and if you find any items in the
list with 'MISSING' in them, click them to updater the link.

What is happening is that the machines have different versions of software
which manage to corrupt the links.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Thomas" wrote in message
...
Our department creates macros with VB (mostly in Excel)
and sends them to users across the country. Occasionaly,
we have users who have used these macros for months
without any problem and then all of sudden they get an
error message.

Most of these problems seem to occur with the Left and
Right commands. They work for a long period of time.
Then all of sudden there is an error. When we debug the
issue, the highlighted word is Left or Right. We have
begun using Mid instead and this doesn't seem to happen as
much.

(It also sometimes happens with "Cols". When we
substitute Range for Columns the issue doesn't seem to
happen as much also.)

Following is an example of code we have used for months
without any problem.

YR = IIf(Dorder = 2, Left(Dtext, 2), Right (Dtext,2))

All of sudden some, but not all, users have started
experiencing a "Compile Error: Wrong number of arguements
or invalid property assignment".

Has anybody experienced anything like this before? What
causes this issue? Does a different machine setup (e.g.,
version of Excel, etc.) have any affect?

Any information you can provide or if you can point us to
any reference material to resolve this would be
appreciated. Thanks for the help.



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
sum everything but errors Jeffrey Excel Worksheet Functions 5 November 12th 07 10:56 PM
VALUE Errors nastech Excel Discussion (Misc queries) 1 October 10th 07 09:28 AM
Excel Throwing Circular Errors When No Errors Exist MDW Excel Worksheet Functions 1 August 10th 06 02:15 PM
Any errors in this? Frazer Excel Discussion (Misc queries) 0 August 19th 05 08:17 PM
Unresolved Errors in IF Statements - Errors do not show in results Markthepain Excel Worksheet Functions 2 December 3rd 04 08:49 AM


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