Home > Software engineering >  VB can't call external statements?
VB can't call external statements?

Time:09-25

Such as the following statement
 Private Sub Command1_Click () 
MSGBOX "111"
End Sub

Write a text file, called when running the program this statement

Is there a way to???

CodePudding user response:

This seems not ok, because the text file is a kind of pure character, although you in a text file is stored
Private Sub Command1_Click ()
MSGBOX "111"
End Sub
But read in VB is a string, [color=# FF0000 ] rather than a button click event [/color] "code", is not an executable statements, so it can only display in other controls, rather than executed,

CodePudding user response:

Yes, mscript controls,

CodePudding user response:

Can, a total of two steps:
1. Use the command line call VB6 to compile this text file, you
Such as: using Shell statement calling the following contents of mk. Bat:
CD/d "C: \ Program Files \ Microsoft Visual Studio \ VB98"
VB6. EXE/m "your project file. VBP"/out "in the process of compile log file. The log"

2. Use the Shell statement execution step 1 compiled exe

  • Related