View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Compile error :: Trim, ...

Trim is built into excel's VBA. It should not cause an error.

So if you're getting an error message on this statement, it usually means that
you have an invalid reference in that workbook's project.

Open excel and your workbook
Open the VBE and select your workbook's project.
Then click on: Tools|References
Look for MISSING reference.

Uncheck that missing reference.

Then test your code. If it works ok, then go back to excel and save your
workbook.

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


--

Dave Peterson