A combobox is suppose to be a combination of a TextField and combobox. Many useful functions from the TextField class seem to be missing from the combobox. I did not expect this to work but I have even attempted casting a combobox as a TextField. Any way around this problem?
[quote=179466:@Markus Winter]You might not need to do that. The system shortcut works just fine for me (but then I’m on a Mac).
Michel, have you tried the system shortcut for SelectAll on Windows?[/quote]
Ctrl-A works perfectly as well. But I thought what Oliver wanted was to do that in code. But now I notice this 2013 thread was hijacked, and Oliver must have moved on a long time ago. At any rate, proof is in the pudding and the ComboBox selstart and sellenght work perfectly.
[quote=179463:@Michel Bujardet]You should use the latest version. It works perfectly in 2015R1. For instance. Windows 10 Tech Preview.
Sub Action()
ComboBox1.SelStart = 1
ComboBox1.SelLength = len(ComboBox1.text)
End Sub
Update : I just tried the same test program in 2014R3.2 with exactly the same result. It is not nice to spread false information
Oliver : To select all, just do what I posted.[/quote]
Setting SelStart to 1 will start the selection with the second character. You need to set it to 0 to select the entire contents.