Hello All,
Here is some background information:
1. I use Excel 2007.
2. I am a novice coder. I apologize upfront for any ignorant questions.
3. I don't know if I can paste userform pictures. I would be happy to email my spreadsheet macro to anyone who wishes to see it.
4. My userform is a multipage control that covers 90% of the form. A frame ("Frame1") covers the other 10%, but does not reside within the multipage. "Page 1" of the multipage contains approximately 77 controls--labels, Listbox, Combobox, and CommandButtons.
I have two goals:
1. I want to write code that results in a visible cursor within a Combobox. Consequently, one may utilize arrow keys to scroll up and down within the Combobox without having to mouse-click within the Combobox. Also, I don't want focus to leave the Combobox. Sometimes, when I scrow down using an arrow key, focus goes to another control.
2. I want arrow key actuation to mimic "Commandbutton_click" events. The userform is a process-specific, troubleshooting flowsheet that walks an operator through a series of questions and actions. For some processes, there are over 50 steps that an operator may cycle through. Instead of clicking on a "GotoNext" button 50 times, I want to reliably use arrow keys.
I have the following problems:
1. When I "SetFocus" to the Combobox, I cannot see a blinking cursor. Nonetheless, sometimes I can scroll within the Combobox using arrow keys. Other times, pressing arrow keys results in the "focus" changing to other controls. Ultimately, I eventually cannot even see where the focus is. Excel "Help" states the following: "By default, setting the focus to a control does not activate the control's window or place it on top of other controls." Alrighty then, how do I "activate" a Combobox that results the cursor within the Combobox, as if I actually mouse-clicked the Combobox?
2. When I utilize arrow keys to actuate a CommandButton, sometimes it doesn't work (i.e., focus goes somewhere else):
- I've utilize "Frame1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)."
- I set focus to Frame1. I did this because it seems less likely to lose focus than controls on Page 1.
- On all userform controls, I've set "TabStop = False" and "TakeControl******* = False".
I appreciate your help and patience!!
Regards,
John
Here is some background information:
1. I use Excel 2007.
2. I am a novice coder. I apologize upfront for any ignorant questions.
3. I don't know if I can paste userform pictures. I would be happy to email my spreadsheet macro to anyone who wishes to see it.
4. My userform is a multipage control that covers 90% of the form. A frame ("Frame1") covers the other 10%, but does not reside within the multipage. "Page 1" of the multipage contains approximately 77 controls--labels, Listbox, Combobox, and CommandButtons.
I have two goals:
1. I want to write code that results in a visible cursor within a Combobox. Consequently, one may utilize arrow keys to scroll up and down within the Combobox without having to mouse-click within the Combobox. Also, I don't want focus to leave the Combobox. Sometimes, when I scrow down using an arrow key, focus goes to another control.
2. I want arrow key actuation to mimic "Commandbutton_click" events. The userform is a process-specific, troubleshooting flowsheet that walks an operator through a series of questions and actions. For some processes, there are over 50 steps that an operator may cycle through. Instead of clicking on a "GotoNext" button 50 times, I want to reliably use arrow keys.
I have the following problems:
1. When I "SetFocus" to the Combobox, I cannot see a blinking cursor. Nonetheless, sometimes I can scroll within the Combobox using arrow keys. Other times, pressing arrow keys results in the "focus" changing to other controls. Ultimately, I eventually cannot even see where the focus is. Excel "Help" states the following: "By default, setting the focus to a control does not activate the control's window or place it on top of other controls." Alrighty then, how do I "activate" a Combobox that results the cursor within the Combobox, as if I actually mouse-clicked the Combobox?
2. When I utilize arrow keys to actuate a CommandButton, sometimes it doesn't work (i.e., focus goes somewhere else):
- I've utilize "Frame1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)."
- I set focus to Frame1. I did this because it seems less likely to lose focus than controls on Page 1.
- On all userform controls, I've set "TabStop = False" and "TakeControl******* = False".
I appreciate your help and patience!!
Regards,
John