Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Canīt set focus on OleObjects ComboBox | Excel Programming | |||
Which combobox has the focus? | Excel Programming | |||
Focus after combobox | Excel Programming | |||
ComboBox and Set Focus | Excel Programming | |||
Focus on combobox | Excel Programming |