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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing VB script to get the function names using VB

Status
Not open for further replies.

kamm

Programmer
Dec 4, 2000
17
GB
Hi, I am looking for ideas on how to get all the function names out of a VBScript using VB. I want to put these function names in a combo box to display to the user.

Thanks in advance
 

With the amount of information you have supplied it is hard to tell exactly what you are asking, so for future reference I will point you to FAQ222-2244.

Now to start taking guesses at what you want.

Are you asking on how to open a file? Then check out...
FreeFile Function
Open Statement
Input Statement
Get Statement
Line Input Statement
File System Object (Microsoft Scripting Runtime)

Add items to a combo box??? Use the AddItem method

Parse strings???? Then check out the following functions...
InStr
InStrRev
Left
Mid
Right
Trim
RTrim
LTrim

The Split function also comes to mind and may help you in the future and possiblily the FileLen function.

Good Luck

 
OK, perhaps I was not clear, I thought I was. I have a VBscript, using VB I want to read through that VBScript (without running it) and get the names of all the functions that are present in that script. I then want to put the names of these functions into a VB combo box. I am fully aware of the Instr, Rtrim etc functions which are available in VB but I wondered if there was a way of getting these out without using any of those, a function that VB has or an object model perhaps?

Sorry if I did not present the question clearly enough for you initially.

 
After further investigation I have discovered I can use MS Script Control (msscript.oca).

Thanks anyway...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top