View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Compile error :: Trim, ...

Hi,

I don't understand why it would fail to compile TRIM() without seeing the
whole line and it would have helped had you given the error message but one
possibility is that this other machine has 'Option Explicit' in another Sub
which means you must declare all of your variables. i.e

Dim i as Long
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"QB" wrote:

I have an excel 2003 xls which works fine on my pc. When I send it to a
colleague, it spits out errors.

When he compiles it it highlight a Trim() command. When we delete the
Trim(), just to test further, it then highlights an integer variable 'i'
which is simply a counter. If a change that and compile further, it
highlight UCase$... and I stopped trying to fix it.

What is going on? Anyone ever seen this before. I check the references
libraries and they are all OK.

Thank you for your input,

QB