Results 1 to 7 of 7

Thread: [RESOLVED] need help

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Resolved [RESOLVED] need help

    I'm trying to make a project that will make commands valid within the project... example i got a command1 button and a text1 text and when I click the command1 i want it to make the text in text1 work when you run the project... let's say I want the form to close when i write end in text1 and then click command1... is that possible?

  2. #2
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: need help

    do u need to execute some specific command words? or fully?
    scripting control may help u, which is executing statement from string.

    edited:
    see this link
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: need help

    i want to be able to code when my program is running kinda deal... im not very good with coding yet very new to vb i did this

    Private Sub Command1_Click()
    Cmd1
    End Sub

    Private Sub Form_Load()
    Dim Cmd1 As String
    Text1.Text = Cmd1
    End Sub

    but that doesnt work any idea? when i write end in text1 i want the program to close like if you wrote

    Private Sub Command1_Click()
    end
    End Sub

    but instead of in vb i want to make it work with my running program

  4. #4
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: need help

    if u need to use some specific words only, try something like this
    Code:
    Private Sub Command1_Click()
    Select Case Text1
        Case LCase("End")
            Unload Me 'unload form
        Case LCase("Msg")
            MsgBox "Msg"
        '..... add more cases as u need
        
    End Select
    End Sub
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: need help

    is it possible to add cases when you run your program from your running program?... so its not possible to just do the commands from your text1? you need to make the case for it to happen? no way around it?

  6. #6
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: need help

    i think u need to hav a look into Script control.
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: need help

    i tried their example and it doesnt work

    http://support.microsoft.com/kb/184740

    the example on their of the link you gave me... it tells me

    .Modules(GlobalModule).Hello "Jane Doe"

    the .Hello part is highlighted meaning it doesnt work and i do all they tell me to do. im just trying to understand how script control works

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