Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CmdButton - How to make button it the default button?


I have three buttons on a form I want one button (cmdFind) to activate
when the enter key is pressed. I have two text boxes that can have
data entered into them.

The three buttons: cmdFind, cmdClear and cmdClose.
The two text boxes: txtPlate and txtModel

I enter a license plate number in a text box or a vehicle model in a
different text box. When I put data into either box and hit enter I
want to activate the cmdFind command button.

Many thanks....the grey cells have failed me!

Craig


--
Craigm
------------------------------------------------------------------------
Craigm's Profile: http://www.excelforum.com/member.php...o&userid=24381
View this thread: http://www.excelforum.com/showthread...hreadid=516179

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default CmdButton - How to make button it the default button?

Set the Default property on that button to True.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Craigm" wrote in
message ...

I have three buttons on a form I want one button (cmdFind) to activate
when the enter key is pressed. I have two text boxes that can have
data entered into them.

The three buttons: cmdFind, cmdClear and cmdClose.
The two text boxes: txtPlate and txtModel

I enter a license plate number in a text box or a vehicle model in a
different text box. When I put data into either box and hit enter I
want to activate the cmdFind command button.

Many thanks....the grey cells have failed me!

Craig


--
Craigm
------------------------------------------------------------------------
Craigm's Profile:

http://www.excelforum.com/member.php...o&userid=24381
View this thread: http://www.excelforum.com/showthread...hreadid=516179



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default CmdButton - How to make button it the default button?


Boy do I feel dumb. Thanks for your help. I kept trying to setfocus
and that just was not working at all.

Thanks Again,

Craig


--
Craigm
------------------------------------------------------------------------
Craigm's Profile: http://www.excelforum.com/member.php...o&userid=24381
View this thread: http://www.excelforum.com/showthread...hreadid=516179

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
set default font color button Lance in California Excel Discussion (Misc queries) 0 May 28th 09 06:13 PM
Add Button Image to Default Images? Kou Vang[_2_] Excel Programming 1 January 30th 06 07:50 PM
Option Button as default StephanieH Excel Programming 2 May 17th 05 02:14 PM
messagebox without default button Peter Janssens Excel Programming 1 November 21st 04 03:55 PM
messagebox without default button Peter Janssens Excel Programming 0 November 21st 04 02:18 PM


All times are GMT +1. The time now is 09:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"