|
-
Aug 30th, 2011, 09:28 PM
#1
[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?
-
Aug 30th, 2011, 09:57 PM
#2
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
-
Aug 30th, 2011, 10:00 PM
#3
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
-
Aug 30th, 2011, 10:26 PM
#4
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
-
Aug 30th, 2011, 10:34 PM
#5
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?
-
Aug 30th, 2011, 10:44 PM
#6
Re: need help
i think u need to hav a look into Script control.
-
Aug 30th, 2011, 11:11 PM
#7
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|