Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default Set Focus On ComboBox

Greetings,

I have a Toolbox ComboBox on a sheet. I need to clear its' contents
and then start typing into it to find the next match.

I tried this code to clear the contents:
__________________________________________________ ________

Private Sub ComboBox1_GotFocus()

ComboBox1.Text = vbNullString

End Sub
__________________________________________________ ________

This cleared the contents fine, but then jumped to the next cell in
the worksheet.

Is there a way to clear the contents of the ComboBox and stay in the
ComboBox until I'm finished finding the next record?

Any help will be appreciated.

-Minitman

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Set Focus On ComboBox

Have you tried adding additional lines of code into the GotFocus event?

"Minitman" wrote:

Greetings,

I have a Toolbox ComboBox on a sheet. I need to clear its' contents
and then start typing into it to find the next match.

I tried this code to clear the contents:
__________________________________________________ ________

Private Sub ComboBox1_GotFocus()

ComboBox1.Text = vbNullString

End Sub
__________________________________________________ ________

This cleared the contents fine, but then jumped to the next cell in
the worksheet.

Is there a way to clear the contents of the ComboBox and stay in the
ComboBox until I'm finished finding the next record?

Any help will be appreciated.

-Minitman


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default Set Focus On ComboBox

Hey JLGWhiz,

Thanks for the reply.

I don't know what to add to that GotFocus event code!
Everything I have tried has only made things worse!!!

Right now it is erroring out when I open the workbook.

Everything worked until I tried to change from a
ToolbarFormsComboBox to a ToolbarControl ToolboxComboBox.

The reason to try and change is that the Control Toolbox ComboBox can
be entered into, cleared and a name can be typed in with the ComboBox
using it's MatchEntry=1 - fmMatchEntryComplete property to find a
match, if any (not available with the Forms ComboBox).

It is the Control Toolbox ComboBox conversion that I am having a great
deal of problems with, GotFocus is only the first.

I am not sure how much code you need to see (if any) to direct me in
the right direction.

Any help, ideas, tricks or samples in dealing with this Control
Toolbox ComboBox would be greatly appreciated.

-Minitman


On Fri, 4 Jul 2008 19:12:00 -0700, JLGWhiz
wrote:

Have you tried adding additional lines of code into the GotFocus event?

"Minitman" wrote:

Greetings,

I have a Toolbox ComboBox on a sheet. I need to clear its' contents
and then start typing into it to find the next match.

I tried this code to clear the contents:
__________________________________________________ ________

Private Sub ComboBox1_GotFocus()

ComboBox1.Text = vbNullString

End Sub
__________________________________________________ ________

This cleared the contents fine, but then jumped to the next cell in
the worksheet.

Is there a way to clear the contents of the ComboBox and stay in the
ComboBox until I'm finished finding the next record?

Any help will be appreciated.

-Minitman



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Set Focus On ComboBox

How does it jump to the next cell? When I mock something up, it clears the
value out and that's it.

--
Tim Zych
www.higherdata.com
Compare data in worksheets and find differences with Workbook Compare
A free, powerful, flexible Excel utility


"Minitman" wrote in message
...
Greetings,

I have a Toolbox ComboBox on a sheet. I need to clear its' contents
and then start typing into it to find the next match.

I tried this code to clear the contents:
__________________________________________________ ________

Private Sub ComboBox1_GotFocus()

ComboBox1.Text = vbNullString

End Sub
__________________________________________________ ________

This cleared the contents fine, but then jumped to the next cell in
the worksheet.

Is there a way to clear the contents of the ComboBox and stay in the
ComboBox until I'm finished finding the next record?

Any help will be appreciated.

-Minitman



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default Set Focus On ComboBox

Hey Tim,

Thanks for the reply.

That is a good question. I'm not sure!

I think it may have something to do with what it is trying to do.

As I mentioned in my last reply, this whole problem started with
trying to change the ComboBox from the Forms ComboBox to the
Control Toolbox ComboBox.

In the Forms ComboBox, there are no events available (including
GotFocus). I was trying to find a way to clear the contents and have
that change reflect in the cells with formulas.

-Minitman





On Sat, 5 Jul 2008 11:49:35 -0700, "Tim Zych"
<tzych@NOSp@mE@RTHLINKDOTNET wrote:

How does it jump to the next cell? When I mock something up, it clears the
value out and that's it.




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
Canīt set focus on OleObjects ComboBox RCL Excel Programming 1 November 25th 06 02:49 PM
Which combobox has the focus? Daniel Bonallack Excel Programming 5 June 1st 06 02:20 AM
Focus after combobox Ed Excel Programming 4 September 27th 05 01:48 PM
ComboBox and Set Focus Ming Shao[_2_] Excel Programming 1 April 28th 04 06:55 PM
Focus on combobox atkscott Excel Programming 4 November 20th 03 12:36 AM


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

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"