|
-
Jun 11th, 2005, 11:55 PM
#1
Thread Starter
Member
enter
yes i was wondering what the code is so that when ya hit enter it enter's the command button like ya clicked it
-
Jun 12th, 2005, 12:00 AM
#2
Frenzied Member
Re: enter
Just set the commands button Default property to true. That will make it so everytime you hit enter, that command button will be activated.
You can also change it during runtime with
Command1.Default = True ' Or False
Hope that helps
-
Jun 12th, 2005, 12:14 AM
#3
Member
Re: enter
It depends on what you want the code to do and what you are hitting enter on.... Your question is a bit unclear.
Usually you enter your code in the sub procedure of a particular event. For instance in the click event of a command button, you would type your code in the Private Sub Command1_Click() section.
Try a message box:
VB Code:
Private Sub Command1_Click()
MsgBox "Hello World!"
End Sub
Forgive me if this is not the question you were asking. Please try and give us a little more information as to what it is you are trying to accomplish.
There are also alot of tutorials and code snippets available on this site that can be extremely helpful.
I usually try and do searches of previous posts before I post my own question (90% of the time I find my answer w/o having to post) and try to give whatever code I have already written included in my post, otherwise I may not get any responses...
Hope that helps
-
Jun 12th, 2005, 12:15 AM
#4
Thread Starter
Member
Re: enter
ahhh helps verry mutch ty
-
Jun 12th, 2005, 12:18 AM
#5
Member
Re: enter
Just set the commands button Default property to true. That will make it so everytime you hit enter, that command button will be activated.
You can also change it during runtime with
Command1.Default = True ' Or False
doh.....
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
|