Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleExecute a line of code stored in a string
Keywordsexecute line, VBA, vba6.dll, vba5.dll, vba332.dll
CategoriesSoftware Engineering
 
Thanks to Sergio Perciballi.

Use the EbExecuteLine API function in vba6.dll, vba5.dll, or vba332.dll.

 
Function FExecuteCode(stCode As String, Optional fCheckOnly _
    As Boolean) As Boolean
    FExecuteCode = EbExecuteLine(StrPtr(stCode), 0&, 0&, _
        Abs(fCheckOnly)) = 0
End Function

Private Sub Command1_Click()
    Dim res As Boolean
    res = FExecuteCode(Text1.Text)
    Label1.Caption = "Status = " & res
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated