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!

Execute line of code from string variable or text box! This works !!!

What VB shoud be able to do!

Execute line of code from string variable or text box! This works !!!

by  MickeD  Posted    (Edited  )
Hi!
There is a great undoced function EbExecuteLine
Declaration

' For VB5
Private Declare Function EbExecuteLine Lib "vba5.dll" (ByVal pStringToExec As Long, ByVal Unknownn1 As Long, ByVal Unknownn2 As Long, ByVal fCheckOnly As Long) As Long

' For VB6
Private Declare Function EbExecuteLine Lib "vba6.dll" (ByVal pStringToExec As Long, ByVal Unknownn1 As Long, ByVal Unknownn2 As Long, ByVal fCheckOnly As Long) As Long

' FOR Access 97/VBE.dll clients like Word 97 and Excel 97
Declare Function EbExecuteLine Lib "vba332.dll" (ByVal pStringToExec As Long, ByVal Unknownn1 As Long, ByVal Unknownn2 As Long, ByVal fCheckOnly As Long) As Long


For examples and additional info look here:
http://www.tek-tips.com/viewthread.cfm?spid=711&newpid=711&sqid=97332
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top