Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do I create a working executable file in Vb.net?

Posted on 2004-09-21
12
Medium Priority
?
288 Views
Last Modified: 2010-04-17
I have managed to go through the process of making an executable file but when I come to running the exe file it displays an error message.

The program I have created integrates MS Word, Excel and the opening of various templates. The program works fine in debug mode but when I come to making exe file it doesn't work!

Many thanks in advance,

Gareth
0
Comment
Question by:GarethWham
12 Comments
 

Assisted Solution

by:rommatrix
rommatrix earned 300 total points
ID: 12112679
Do you try to run it in ther computer ?
if you are , then there is some components you don't have installed at the other computer.
If in the same pc, you have to check the pathes used in the program code.
What is the error message text displayed?
Also You may check your pc for virus.

Rami
0
 
LVL 60

Assisted Solution

by:Julian Hansen
Julian Hansen earned 300 total points
ID: 12113083
What is the error message?
0
 

Author Comment

by:GarethWham
ID: 12113631
Hello,

The error message says:

File or assembly name Interop.Excel, or one of its dependencies, was not found.

and when I try to open a word template I get the same message but with 'name Interop.Word'

Any ideas?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 23

Assisted Solution

by:Snarf0001
Snarf0001 earned 600 total points
ID: 12113916
Right click on the Interop objects in the References folder under the solution explorer, and go to properties.
Set "Copy-Local" to false.

I've had issues with these as well, I believe when copy local is false, the program will look for the dlls in their original location, which in the case of Office automation objects, it should.

0
 
LVL 23

Assisted Solution

by:Snarf0001
Snarf0001 earned 600 total points
ID: 12113923
This assumes that the client computer you're running the program on DOES have office installed already.
0
 
LVL 3

Accepted Solution

by:
Validor earned 300 total points
ID: 12114888
Copy the Interop.Excel.DLL assembly from the bin\debug or bin\release directory along with the .EXE to the user's machine.

Also be aware that not only must the MS Office be installed on the user's machine, but it will likely have to be the same VERSION as yours.  In such cases, it usually reports an error such as "Interface not supported".
0
 

Author Comment

by:GarethWham
ID: 12116515
Validor,

I am running it on my machine and I still get the error message.

Snarf0001,

I will try your suggestions tommorow.

Cheers all
0
 

Author Comment

by:GarethWham
ID: 12121042
I have set the Interop objects property "Copy Local" to 'False' but I still cant get it to work. Does anyone have any other suggestions?

Thanks,

Gareth
0
 

Author Comment

by:GarethWham
ID: 12122132
Ok,

I have managed to save the exe. file to floppy disk with the Interop.Word.dll file as well. On my computer I can run the exe file and open a word document, but when I transfer the program to another computer and try and run it an error mesage is displayed saying:

The application failed to initialize properly (0xc0000135).

Anyone know?

Cheers
0
 

Author Comment

by:GarethWham
ID: 12168080
Hello,

I have found the solution to my problem. I simply restarted my computer and it worked. Then to transfer it to another computer I installed the .net framework on the client machine along with the Interop.Word dll file(s).

I split the point evenly between everyone that provided a comment as no single person gave me the full answer.

Trust this is ok,

Gareth
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 12177782
Actually, it is (almost) OK, but *only* now that you have added a comment that described how the problem was solved.

People use Google and EE to search the database and if they see a question that has been "answered" they expect to see an answer somewhere.  They are disappointed, and even get angry when they read through a thread and hit a dead end like this.  

For future reference, suggest that you take a look in the EE Help pages.  This link:
    Closing Questions
    http://www.experts-exchange.com/help.jsp#hs5
lays out the normal procedure from closing answered and unanswerd questions.  Please take a few moments to read through it.  Thanks!

-- DanRollins / EE Page Editor
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Progress
Starting up a Project

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question