Results 1 to 6 of 6

Thread: Can't find it!

  1. #1

    Thread Starter
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125

    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
    <removed by admin>

  2. #2
    Frenzied Member numtel's Avatar
    Join Date
    Apr 2000
    Location
    CA
    Posts
    1,163
    use the windows scripting activeX control, here's a link from cnet
    http://download.cnet.com/downloads/0...st-7-10.880997

  3. #3

    Thread Starter
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    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.
    <removed by admin>

  4. #4
    Frenzied Member numtel's Avatar
    Join Date
    Apr 2000
    Location
    CA
    Posts
    1,163
    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

  5. #5
    GingerFreak
    Guest
    Not sure if this is what your refering to or not

    VB Code:
    1. 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

  6. #6

    Thread Starter
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    Thanks GingerFreak... That was the API. I found this, now that I used EbExecuteLine as a keyword

    VB Code:
    1. '------------------------------------------
    2. '   (c) 1999 Trigeminal Software, Inc.  All Rights Reserved
    3. '------------------------------------------
    4. 'Thanks to ----------michka - Michael Kaplan
    5. 'Rest of code by Sergio Perciballi -oigres P (Aug-6-2000)
    6. 'Email: [email][email protected][/email]
    7. 'Uses the function used by the immediate window
    8. 'to execute a line of code.
    9. Option Compare Text
    10. Option Explicit
    11.  
    12. Private Declare Function EbExecuteLine Lib "vba6.dll" _
    13. (ByVal pStringToExec As Long, ByVal Foo1 As Long, _
    14. ByVal Foo2 As Long, ByVal fCheckOnly As Long) As Long
    15.  
    16. ' For VB5 IDE
    17. 'Declare Function EbExecuteLine Lib "vba5.dll" _
    18. '(ByVal pStringToExec As Long, ByVal Foo1 As Long, _
    19. 'ByVal Foo2 As Long, ByVal fCheckOnly As Long) As Long
    20.  
    21. ' FOR Access 97/VBE.dll clients like Word 97 and Excel 97
    22. 'Declare Function EbExecuteLine Lib "vba332.dll" _
    23. '(ByVal pStringToExec As Long, ByVal Foo1 As Long, _
    24. 'ByVal Foo2 As Long, ByVal fCheckOnly As Long) As Long
    25.  
    26. Function FExecuteCode(stCode As String, _
    27. Optional fCheckOnly As Boolean) As Boolean
    28.     FExecuteCode = EbExecuteLine(StrPtr(stCode), 0&, 0&, Abs(fCheckOnly)) = 0
    29. End Function
    30.  
    31. 'Usage
    32.  
    33. Private Sub Command1_Click()
    34.     FExecuteCode "End"
    35. End Sub
    <removed by admin>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width