![]() |
Current Selection fo CommandBarComboBox |
Post Reply ![]() |
Author | |
mxcolin ![]() Newbie ![]() ![]() Joined: 08 June 2006 Location: United Kingdom Status: Offline Points: 11 |
![]() ![]() ![]() ![]() ![]() Posted: 28 June 2006 at 10:10am |
How do I get/set the current text selection for a CommandBarComboBox and for that matter a CommandBarEdit object? There doesn't seem to be a property that lets me get this. Any ideas?
Colin
|
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
Dim ControlComboSize As CommandBarComboBox
Set ControlComboSize = .Add(xtpControlComboBox, ID_COMBO_SIZE, "Size") ControlComboSize.Width = 60 ControlComboSize.AddItem "8" ControlComboSize.AddItem "9" ControlComboSize.AddItem "10" ControlComboSize.AddItem "11" ControlComboSize.AddItem "12" ControlComboSize.DropDownListStyle = True 'Set to Item 3 ControlComboSize.ListIndex = 3 'Print out text Debug.Print ControlComboSize.Text |
|
![]() |
|
mxcolin ![]() Newbie ![]() ![]() Joined: 08 June 2006 Location: United Kingdom Status: Offline Points: 11 |
![]() ![]() ![]() ![]() ![]() |
Sorry, I didn't explain that very well. I'm looking for the actual selected or highlighted text. So if I have highlighted "peter" in the word "peterson" how I programatically go about getting that "peter" is selected. I suppose the equivalent in a VB TextBox are the SelLength, SelStart, SelText Properties.
Thanks
Colin
|
|
![]() |
|
mxcolin ![]() Newbie ![]() ![]() Joined: 08 June 2006 Location: United Kingdom Status: Offline Points: 11 |
![]() ![]() ![]() ![]() ![]() |
ANy ideas if this is possible or will I have to use the API possibly to get this?
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |