Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert code to .exe file

Status
Not open for further replies.

deltaair

IS-IT--Management
Nov 3, 2005
43
CH
How can i convert some VB code to a standalone .exe program.
 
deltaair,
vb or vba?
if vb then you would need a compiler - such as vb version 6 or vb.net from ms.
if you mean vba then i'm not sure if it can be done at least into an .exe.
perhaps a bit more info?
regards,
longhair
 
Thanks for replying,

I have some code in excel which I want to make a standalone .exe program because it doesn't need excel really. i don;t know if thats vb or vba. Please let me know how i can do this.

Thanks
 
deltaair,
that is vba. as far as i know it needs excel. that is to say the language is part of excel, you need excel for it to run. what you would need to do to make it stand alone is to convert it to vb6 or vb.net or vbscript or a batch file etc. can you post the code that you want to make an .exe? perhaps if we saw it we could point you in the correct direction.
regards,
longhair
 
Its basically reading/ finding replacing text in text files and copying / deleting them from folders etc.

Here's what the code looks like

Const pathname = "C:......."
Const filename = "fname.txt"

Public Function replaceAll(pathname, filename, String1, String2) As String.....
This replaces some text within the text file.

Then copies into a directory using
FileSystemObject.CopyFile

I have a subroutine...
Public Sub ChangeFile()
Call ReplaceAll(........)
End Sub

Sorry but just as soon as i posted this, a lot of my code vanished into thin air because of excel,....That's the best I can provide... Any info is appreciated.
 


Hi,

VBA code is a subset of VB. It can be compiled in a VB compiler.

If you have no references to application objects, you can compile in VB with no references to other object libraries.

Export the module from the application.

Import the module into the VB editor and compile.

Skip,

[glasses] [red]Be Advised![/red]
The band of elderly oriental musicians, known as Ground Cover, is, in reality...
Asian Jasmine![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top