Solved

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

Posted on 2004-09-21
12
246 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 100 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 51

Assisted Solution

by:Julian Hansen
Julian Hansen earned 100 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
 
LVL 22

Assisted Solution

by:Snarf0001
Snarf0001 earned 200 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 22

Assisted Solution

by:Snarf0001
Snarf0001 earned 200 total points
ID: 12113923
This assumes that the client computer you're running the program on DOES have office installed already.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 3

Accepted Solution

by:
Validor earned 100 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Enhanced For loop vs ForEach Loop 4 58
mapBully challenge 6 93
firstChar challenge 13 86
Counting documents in a Domino View 3 36
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
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.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now