If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > msoControlComboBox query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-09-06, 08:34
Mister Ron Mister Ron is offline
Registered User
 
Join Date: Jul 2006
Posts: 2
Question msoControlComboBox query

Some advice would be appreciated

I have used command bar controls in my addins for some time now but only just begun using the combobox control.

I can enter text in a combo box, hit enter when I press a command bar button, I can then run a sub which uses the value entered in the combo box.

I use "commandbarname" .text to get the value from the combo box

My question is can the value entered in the combo box be passed to the sub without first pressing enter, or if this is not possible can an action be placed on the OnEnter event (if their is a one) of the commandbarcombobox as I have noticed the.on action event does not work for the combobox as it does for a commandbarbutton.

Any help and advice would be appreciated.
Reply With Quote
  #2 (permalink)  
Old 07-12-06, 04:15
randycarpet randycarpet is offline
Registered User
 
Join Date: Jan 2004
Location: Jersey, UK
Posts: 108
Ron, if I understand you correctly you want to do something based on a selection in a combo box when the value changes, rather than changing the combo box value and then pressing Enter. The answer is yes you can fire an event from a value chosen in the combo box but I'm pretty sure you'd have to code it yourself in a Select Case or IF statement in VBA.

If you're not familiar with VBA then this might not make much sense to you:

E.G. in the ComboBoxes OnChange Event you would have code like this:

SELECT CASE ComboBox.Value
CASE 'go here'
'do this
CASE 'go there'
'do that'
END SELECT

I hope that makes sense.


Regards - Andy
Reply With Quote
  #3 (permalink)  
Old 07-25-06, 18:02
Mister Ron Mister Ron is offline
Registered User
 
Join Date: Jul 2006
Posts: 2
Sorry if I wasn't clear, The query I have is with the commandbarcontrols combobox's, which as far as I can see doesn't have any events, for example commandbar buttons have an on action event to fire a sub when they are presed, I am familiar with VB. and have used it to creat ddins that use commandbar buttons

eg if you type a font size in the fontsize combobox in excel then click somewhere on the sheet the font is not resized, you need to enter the font size then press enter or tab. to activate the value entered in the combobox
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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