Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Project - Forms Data Compilation | Excel Discussion (Misc queries) | |||
Excel: Compilation error in Module 1. How can I find it? | Excel Discussion (Misc queries) | |||
Data compilation within a single workbook | Excel Worksheet Functions | |||
Post Compilation Packaging | Setting up and Configuration of Excel | |||
Conditional compilation | Excel Programming |