ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Compilation error question (https://www.excelbanter.com/excel-programming/284510-compilation-error-question.html)

Nathan Gutman

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,


Chip Pearson

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,




GJones

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,

.


Dick Kusleika[_3_]

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,




Nathan Gutman

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.



Tom Ogilvy

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,

.




Tom Ogilvy

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.





Nathan Gutman

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,




All times are GMT +1. The time now is 02:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com