ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   command button and the "enter" and "tab" keys (https://www.excelbanter.com/excel-programming/372122-command-button-enter-tab-keys.html)

dr chuck

command button and the "enter" and "tab" keys
 
I have an extensive macro that works when my command button titled
" Private Sub registrationcomplete_Click() " is clicked.

I have a series of text boxes that are programmed to tab to the next text
box and ultimately to the command box in question. When this series of
textbox's and tabs get to the command box the command box is highlighted.

I would like to be able to activate the command box by either clicking on it
or pressing enter since it is already highlighted.

I am not sure if the command to allow entering to activate the command box
can be entered into the "click" macro above or if a separate macro must be
written?

Suggestions?
--
dr chuck

Norman Jones

command button and the "enter" and "tab" keys
 
Hi Dr. Chuck,

Try setting the CommandButton's Default property to true



---
Regards,
Norman



"dr chuck" wrote in message
...
I have an extensive macro that works when my command button titled
" Private Sub registrationcomplete_Click() " is clicked.

I have a series of text boxes that are programmed to tab to the next text
box and ultimately to the command box in question. When this series of
textbox's and tabs get to the command box the command box is highlighted.

I would like to be able to activate the command box by either clicking on
it
or pressing enter since it is already highlighted.

I am not sure if the command to allow entering to activate the command box
can be entered into the "click" macro above or if a separate macro must be
written?

Suggestions?
--
dr chuck




Dave Peterson

command button and the "enter" and "tab" keys
 
And if you have a button that cancel's the form, you may want to change its
Cancel property to True. Then you can hit the escape key to close the form.

dr chuck wrote:

I have an extensive macro that works when my command button titled
" Private Sub registrationcomplete_Click() " is clicked.

I have a series of text boxes that are programmed to tab to the next text
box and ultimately to the command box in question. When this series of
textbox's and tabs get to the command box the command box is highlighted.

I would like to be able to activate the command box by either clicking on it
or pressing enter since it is already highlighted.

I am not sure if the command to allow entering to activate the command box
can be entered into the "click" macro above or if a separate macro must be
written?

Suggestions?
--
dr chuck


--

Dave Peterson

dr chuck

command button and the "enter" and "tab" keys
 
In my command button properties there is no "default" property. I dont see
the "defualt" property in the object browser either?

Where are these located?
--
dr chuck


"Norman Jones" wrote:

Hi Dr. Chuck,

Try setting the CommandButton's Default property to true



---
Regards,
Norman



"dr chuck" wrote in message
...
I have an extensive macro that works when my command button titled
" Private Sub registrationcomplete_Click() " is clicked.

I have a series of text boxes that are programmed to tab to the next text
box and ultimately to the command box in question. When this series of
textbox's and tabs get to the command box the command box is highlighted.

I would like to be able to activate the command box by either clicking on
it
or pressing enter since it is already highlighted.

I am not sure if the command to allow entering to activate the command box
can be entered into the "click" macro above or if a separate macro must be
written?

Suggestions?
--
dr chuck





Dave Peterson

command button and the "enter" and "tab" keys
 
This is in a userform (with the VBE), right?

If yes, go to the VBE
select your userform
select the ok button
hit F4 to see the properties

Look for the Default property and change it there.




dr chuck wrote:

In my command button properties there is no "default" property. I dont see
the "defualt" property in the object browser either?

Where are these located?
--
dr chuck

"Norman Jones" wrote:

Hi Dr. Chuck,

Try setting the CommandButton's Default property to true



---
Regards,
Norman



"dr chuck" wrote in message
...
I have an extensive macro that works when my command button titled
" Private Sub registrationcomplete_Click() " is clicked.

I have a series of text boxes that are programmed to tab to the next text
box and ultimately to the command box in question. When this series of
textbox's and tabs get to the command box the command box is highlighted.

I would like to be able to activate the command box by either clicking on
it
or pressing enter since it is already highlighted.

I am not sure if the command to allow entering to activate the command box
can be entered into the "click" macro above or if a separate macro must be
written?

Suggestions?
--
dr chuck





--

Dave Peterson

dr chuck

command button and the "enter" and "tab" keys
 
Dave,
I do not understand how? where ? to apply the cancel property and or the
default property. I did find these finally under help in VBA.

what is the syntax

commandbutton1.default= "true"

If so where do you put this? at the beginning of the macro i already have
written for this button?

--
dr chuck


"Dave Peterson" wrote:

And if you have a button that cancel's the form, you may want to change its
Cancel property to True. Then you can hit the escape key to close the form.

dr chuck wrote:

I have an extensive macro that works when my command button titled
" Private Sub registrationcomplete_Click() " is clicked.

I have a series of text boxes that are programmed to tab to the next text
box and ultimately to the command box in question. When this series of
textbox's and tabs get to the command box the command box is highlighted.

I would like to be able to activate the command box by either clicking on it
or pressing enter since it is already highlighted.

I am not sure if the command to allow entering to activate the command box
can be entered into the "click" macro above or if a separate macro must be
written?

Suggestions?
--
dr chuck


--

Dave Peterson


Dave Peterson

command button and the "enter" and "tab" keys
 
I'd put it in the userform_initialize routine. And I'd drop the double quotes.
Just use the plain old Boolean value True.

But you have another reply in the other branch.

dr chuck wrote:

Dave,
I do not understand how? where ? to apply the cancel property and or the
default property. I did find these finally under help in VBA.

what is the syntax

commandbutton1.default= "true"

If so where do you put this? at the beginning of the macro i already have
written for this button?

--
dr chuck

"Dave Peterson" wrote:

And if you have a button that cancel's the form, you may want to change its
Cancel property to True. Then you can hit the escape key to close the form.

dr chuck wrote:

I have an extensive macro that works when my command button titled
" Private Sub registrationcomplete_Click() " is clicked.

I have a series of text boxes that are programmed to tab to the next text
box and ultimately to the command box in question. When this series of
textbox's and tabs get to the command box the command box is highlighted.

I would like to be able to activate the command box by either clicking on it
or pressing enter since it is already highlighted.

I am not sure if the command to allow entering to activate the command box
can be entered into the "click" macro above or if a separate macro must be
written?

Suggestions?
--
dr chuck


--

Dave Peterson


--

Dave Peterson

Tom Ogilvy

command button and the "enter" and "tab" keys
 
In my opinion, better to set it in design mode in the VBE. doesn't sound
like something that would need to be changed.

Set it like any property of a control - using the properties window.

--
Regards,
Tom Ogilvy

"Dave Peterson" wrote in message
...
I'd put it in the userform_initialize routine. And I'd drop the double
quotes.
Just use the plain old Boolean value True.

But you have another reply in the other branch.

dr chuck wrote:

Dave,
I do not understand how? where ? to apply the cancel property and or the
default property. I did find these finally under help in VBA.

what is the syntax

commandbutton1.default= "true"

If so where do you put this? at the beginning of the macro i already have
written for this button?

--
dr chuck

"Dave Peterson" wrote:

And if you have a button that cancel's the form, you may want to change
its
Cancel property to True. Then you can hit the escape key to close the
form.

dr chuck wrote:

I have an extensive macro that works when my command button titled
" Private Sub registrationcomplete_Click() " is clicked.

I have a series of text boxes that are programmed to tab to the next
text
box and ultimately to the command box in question. When this series
of
textbox's and tabs get to the command box the command box is
highlighted.

I would like to be able to activate the command box by either
clicking on it
or pressing enter since it is already highlighted.

I am not sure if the command to allow entering to activate the
command box
can be entered into the "click" macro above or if a separate macro
must be
written?

Suggestions?
--
dr chuck

--

Dave Peterson


--

Dave Peterson




Dave Peterson

command button and the "enter" and "tab" keys
 
That was my reply in the other branch <bg.

But a couple of good reasons to use code might be so that you could copy|paste
to other userforms and not have to remember to change the properties manually.

And it's easier to explain using sample code rather than how to get to the
properties window <vvbg.



Tom Ogilvy wrote:

In my opinion, better to set it in design mode in the VBE. doesn't sound
like something that would need to be changed.

Set it like any property of a control - using the properties window.

--
Regards,
Tom Ogilvy

"Dave Peterson" wrote in message
...
I'd put it in the userform_initialize routine. And I'd drop the double
quotes.
Just use the plain old Boolean value True.

But you have another reply in the other branch.

dr chuck wrote:

Dave,
I do not understand how? where ? to apply the cancel property and or the
default property. I did find these finally under help in VBA.

what is the syntax

commandbutton1.default= "true"

If so where do you put this? at the beginning of the macro i already have
written for this button?

--
dr chuck

"Dave Peterson" wrote:

And if you have a button that cancel's the form, you may want to change
its
Cancel property to True. Then you can hit the escape key to close the
form.

dr chuck wrote:

I have an extensive macro that works when my command button titled
" Private Sub registrationcomplete_Click() " is clicked.

I have a series of text boxes that are programmed to tab to the next
text
box and ultimately to the command box in question. When this series
of
textbox's and tabs get to the command box the command box is
highlighted.

I would like to be able to activate the command box by either
clicking on it
or pressing enter since it is already highlighted.

I am not sure if the command to allow entering to activate the
command box
can be entered into the "click" macro above or if a separate macro
must be
written?

Suggestions?
--
dr chuck

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

dr chuck

command button and the "enter" and "tab" keys
 
i have no idea what a "user form" is.

<vvbf
dr chuck


"Dave Peterson" wrote:

That was my reply in the other branch <bg.

But a couple of good reasons to use code might be so that you could copy|paste
to other userforms and not have to remember to change the properties manually.

And it's easier to explain using sample code rather than how to get to the
properties window <vvbg.



Tom Ogilvy wrote:

In my opinion, better to set it in design mode in the VBE. doesn't sound
like something that would need to be changed.

Set it like any property of a control - using the properties window.

--
Regards,
Tom Ogilvy

"Dave Peterson" wrote in message
...
I'd put it in the userform_initialize routine. And I'd drop the double
quotes.
Just use the plain old Boolean value True.

But you have another reply in the other branch.

dr chuck wrote:

Dave,
I do not understand how? where ? to apply the cancel property and or the
default property. I did find these finally under help in VBA.

what is the syntax

commandbutton1.default= "true"

If so where do you put this? at the beginning of the macro i already have
written for this button?

--
dr chuck

"Dave Peterson" wrote:

And if you have a button that cancel's the form, you may want to change
its
Cancel property to True. Then you can hit the escape key to close the
form.

dr chuck wrote:

I have an extensive macro that works when my command button titled
" Private Sub registrationcomplete_Click() " is clicked.

I have a series of text boxes that are programmed to tab to the next
text
box and ultimately to the command box in question. When this series
of
textbox's and tabs get to the command box the command box is
highlighted.

I would like to be able to activate the command box by either
clicking on it
or pressing enter since it is already highlighted.

I am not sure if the command to allow entering to activate the
command box
can be entered into the "click" macro above or if a separate macro
must be
written?

Suggestions?
--
dr chuck

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


Tom Ogilvy

command button and the "enter" and "tab" keys
 
Does it make a difference if you have solved your problem?

--
Regards,
Tom Ogilvy


"dr chuck" wrote in message
...
i have no idea what a "user form" is.

<vvbf
dr chuck


"Dave Peterson" wrote:

That was my reply in the other branch <bg.

But a couple of good reasons to use code might be so that you could
copy|paste
to other userforms and not have to remember to change the properties
manually.

And it's easier to explain using sample code rather than how to get to
the
properties window <vvbg.



Tom Ogilvy wrote:

In my opinion, better to set it in design mode in the VBE. doesn't
sound
like something that would need to be changed.

Set it like any property of a control - using the properties window.

--
Regards,
Tom Ogilvy

"Dave Peterson" wrote in message
...
I'd put it in the userform_initialize routine. And I'd drop the
double
quotes.
Just use the plain old Boolean value True.

But you have another reply in the other branch.

dr chuck wrote:

Dave,
I do not understand how? where ? to apply the cancel property and or
the
default property. I did find these finally under help in VBA.

what is the syntax

commandbutton1.default= "true"

If so where do you put this? at the beginning of the macro i already
have
written for this button?

--
dr chuck

"Dave Peterson" wrote:

And if you have a button that cancel's the form, you may want to
change
its
Cancel property to True. Then you can hit the escape key to close
the
form.

dr chuck wrote:

I have an extensive macro that works when my command button
titled
" Private Sub registrationcomplete_Click() " is clicked.

I have a series of text boxes that are programmed to tab to the
next
text
box and ultimately to the command box in question. When this
series
of
textbox's and tabs get to the command box the command box is
highlighted.

I would like to be able to activate the command box by either
clicking on it
or pressing enter since it is already highlighted.

I am not sure if the command to allow entering to activate the
command box
can be entered into the "click" macro above or if a separate
macro
must be
written?

Suggestions?
--
dr chuck

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson





All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com