Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Compilation error question

I have designed a workbook which contains quite a bit a vba code.
It runs flawlessly on my computer but a user reports that he gets a
compilation error which he can not see because that VBA project is
password protected.
I can not reproduce this problem because everything run Ok here.
How do I pin down this error?
Thanks,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Compilation error question

Nathan,

There is little if anything you can do to diagnose the problem if
you can't open the VBProject on the machine that is causing the
problem. Are you and the user running the same version of Excel?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Nathan Gutman" wrote in message
...
I have designed a workbook which contains quite a bit a vba

code.
It runs flawlessly on my computer but a user reports that he

gets a
compilation error which he can not see because that VBA project

is
password protected.
I can not reproduce this problem because everything run Ok

here.
How do I pin down this error?
Thanks,



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default Compilation error question

Nathan;

You could edit the code to take advantage of the ERR
reserve word. The ERR method always provides return codes
that are reported.

Go into VBA help and go into the help. Search for ERR and
it will give you examples on how to do it.

Thanks,

Greg



-----Original Message-----
I have designed a workbook which contains quite a bit a

vba code.
It runs flawlessly on my computer but a user reports that

he gets a
compilation error which he can not see because that VBA

project is
password protected.
I can not reproduce this problem because everything run

Ok here.
How do I pin down this error?
Thanks,

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Compilation error question

Nathan

I'll bet dollars to donuts that it's a missing reference on the other
machine. I can't think of what else would cause a compile error. What
references do you have set for your code that the other machine wouldn't?
Maybe you could use late binding on those to avoid the problem.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Nathan Gutman" wrote in message
...
I have designed a workbook which contains quite a bit a vba code.
It runs flawlessly on my computer but a user reports that he gets a
compilation error which he can not see because that VBA project is
password protected.
I can not reproduce this problem because everything run Ok here.
How do I pin down this error?
Thanks,



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Compilation error question

I tend to agree with that. I use a reference to Solver.xla which the
ohter machine may not have.
Wouldn't the reference come to the other machine with my VBA project
but if the Solve add-in was not installed on the other machine than
this could create that error?
And can you elaborate a bit on "late binding"?
Thanks,
On Thu, 4 Dec 2003 16:51:35 -0600, "Dick Kusleika"
wrote:

Nathan

I'll bet dollars to donuts that it's a missing reference on the other
machine. I can't think of what else would cause a compile error. What
references do you have set for your code that the other machine wouldn't?
Maybe you could use late binding on those to avoid the problem.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Compilation error question

Thought the original poster said the user got a compilation error which
means the code doesn't run. Wouldn't your suggestion require that the code
runs?

--
Regards,
Tom Ogilvy

GJones wrote in message
...
Nathan;

You could edit the code to take advantage of the ERR
reserve word. The ERR method always provides return codes
that are reported.

Go into VBA help and go into the help. Search for ERR and
it will give you examples on how to do it.

Thanks,

Greg



-----Original Message-----
I have designed a workbook which contains quite a bit a

vba code.
It runs flawlessly on my computer but a user reports that

he gets a
compilation error which he can not see because that VBA

project is
password protected.
I can not reproduce this problem because everything run

Ok here.
How do I pin down this error?
Thanks,

.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Compilation error question

Late binding would apply to references to COM objects. An XLA isn't a COM
object, so I don't think it is applicable to this situation if that is the
problem. I believe you would need to remove the reference to solver and
create it programmtically if you successfully test for the availability of
solver.xla.

--
Regards,
Tom Ogilvy

Nathan Gutman wrote in message
...
I tend to agree with that. I use a reference to Solver.xla which the
ohter machine may not have.
Wouldn't the reference come to the other machine with my VBA project
but if the Solve add-in was not installed on the other machine than
this could create that error?
And can you elaborate a bit on "late binding"?
Thanks,
On Thu, 4 Dec 2003 16:51:35 -0600, "Dick Kusleika"
wrote:

Nathan

I'll bet dollars to donuts that it's a missing reference on the other
machine. I can't think of what else would cause a compile error. What
references do you have set for your code that the other machine wouldn't?
Maybe you could use late binding on those to avoid the problem.




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Compilation error question

Problem solved. I was able to reproduce that error by renaming
Solve.xla so it wouldn't be available. The user did not have the
Solver add-in available. Once he fixed it everything ran OK.
Oh well, till next time.
Thank you all for your help.
On Thu, 04 Dec 2003 17:16:16 -0500, Nathan Gutman
wrote:

I have designed a workbook which contains quite a bit a vba code.
It runs flawlessly on my computer but a user reports that he gets a
compilation error which he can not see because that VBA project is
password protected.
I can not reproduce this problem because everything run Ok here.
How do I pin down this error?
Thanks,


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
Project - Forms Data Compilation John Leigh Excel Discussion (Misc queries) 0 September 25th 07 05:44 PM
Excel: Compilation error in Module 1. How can I find it? Tom Torda Excel Discussion (Misc queries) 1 January 13th 07 11:51 PM
Data compilation within a single workbook Robert Excel Worksheet Functions 0 March 13th 06 11:23 PM
Post Compilation Packaging StephenAccountant Setting up and Configuration of Excel 0 February 22nd 06 02:59 AM
Conditional compilation WK Excel Programming 1 August 18th 03 01:05 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"