|
-
Feb 1st, 2002, 05:06 PM
#1
Thread Starter
PowerPoster
Can't find it!
I am looking for a thread that I saw a while back that allowed you to type a VBScript statement into a textbox, then press a button, and it would execute the code, but I can't find it anywhere. I can't remember any keywords or the title of the thread... I'm really stumped. Does anyone else remember reading this, and did you save the thread URL or contents?
Thanks
-Joey
-
Feb 1st, 2002, 05:18 PM
#2
Frenzied Member
use the windows scripting activeX control, here's a link from cnet
http://download.cnet.com/downloads/0...st-7-10.880997
-
Feb 1st, 2002, 05:20 PM
#3
Thread Starter
PowerPoster
But I remember using just an API to do it. I don't really want to add another control to the project. I'm searching through the API viewer, to see if I recognize anything.
-
Feb 1st, 2002, 05:22 PM
#4
Frenzied Member
oh, that's a little more complicated, do you want vbscript? you could write your own or i'll let you use mine that i've got in my signature
-
Feb 1st, 2002, 05:26 PM
#5
Not sure if this is what your refering to or not
VB Code:
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
Only thing is it doesn't work in a compiled exe
I think I may be thinking of the wrong thing but here you go anyway
GingerFreak
-
Feb 1st, 2002, 05:40 PM
#6
Thread Starter
PowerPoster
Thanks GingerFreak... That was the API. I found this, now that I used EbExecuteLine as a keyword
VB Code:
'------------------------------------------
' (c) 1999 Trigeminal Software, Inc. All Rights Reserved
'------------------------------------------
'Thanks to ----------michka - Michael Kaplan
'Rest of code by Sergio Perciballi -oigres P (Aug-6-2000)
'Uses the function used by the immediate window
'to execute a line of code.
Option Compare Text
Option Explicit
Private Declare Function EbExecuteLine Lib "vba6.dll" _
(ByVal pStringToExec As Long, ByVal Foo1 As Long, _
ByVal Foo2 As Long, ByVal fCheckOnly As Long) As Long
' For VB5 IDE
'Declare Function EbExecuteLine Lib "vba5.dll" _
'(ByVal pStringToExec As Long, ByVal Foo1 As Long, _
'ByVal Foo2 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 Foo1 As Long, _
'ByVal Foo2 As Long, ByVal fCheckOnly As Long) As Long
Function FExecuteCode(stCode As String, _
Optional fCheckOnly As Boolean) As Boolean
FExecuteCode = EbExecuteLine(StrPtr(stCode), 0&, 0&, Abs(fCheckOnly)) = 0
End Function
'Usage
Private Sub Command1_Click()
FExecuteCode "End"
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|