Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-09-21
12
Medium Priority
?
286 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 59

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
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
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

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.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

721 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