Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I've got a userform (called stagedetails) with a combobox (called combobox3) that should always be the active control when the form is shown. It works perfectly the first time but once a button on the form has been clicked I can't change the focus back. The form can be seen at www.thestormdragon.com The default button is "Save and Return". I've tried unloading and reloading / hiding and showing but it makes no difference and the vba code of stagedetails.combobox3.setfocus doesn't work. I've searched through this group and the google group archives without success. Any ideas? Many thanks David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use
Private Sub UserForm_Initialize() Me.ComboBox3.SetFocus End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "David Coleman" wrote in message ... Hi I've got a userform (called stagedetails) with a combobox (called combobox3) that should always be the active control when the form is shown. It works perfectly the first time but once a button on the form has been clicked I can't change the focus back. The form can be seen at www.thestormdragon.com The default button is "Save and Return". I've tried unloading and reloading / hiding and showing but it makes no difference and the vba code of stagedetails.combobox3.setfocus doesn't work. I've searched through this group and the google group archives without success. Any ideas? Many thanks David |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Chip
I've just tried that and it makes no difference. Is there anyway of tracking what it's doing / finding out why it's failing? Thanks David "Chip Pearson" wrote in message ... Use Private Sub UserForm_Initialize() Me.ComboBox3.SetFocus End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "David Coleman" wrote in message ... Hi I've got a userform (called stagedetails) with a combobox (called combobox3) that should always be the active control when the form is shown. It works perfectly the first time but once a button on the form has been clicked I can't change the focus back. The form can be seen at www.thestormdragon.com The default button is "Save and Return". I've tried unloading and reloading / hiding and showing but it makes no difference and the vba code of stagedetails.combobox3.setfocus doesn't work. I've searched through this group and the google group archives without success. Any ideas? Many thanks David |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With userform_activate() , rather than userform_initialize, it
works perfectly. Thanks David "David Coleman" wrote in message ... Hi Chip I've just tried that and it makes no difference. Is there anyway of tracking what it's doing / finding out why it's failing? Thanks David "Chip Pearson" wrote in message ... Use Private Sub UserForm_Initialize() Me.ComboBox3.SetFocus End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "David Coleman" wrote in message ... Hi I've got a userform (called stagedetails) with a combobox (called combobox3) that should always be the active control when the form is shown. It works perfectly the first time but once a button on the form has been clicked I can't change the focus back. The form can be seen at www.thestormdragon.com The default button is "Save and Return". I've tried unloading and reloading / hiding and showing but it makes no difference and the vba code of stagedetails.combobox3.setfocus doesn't work. I've searched through this group and the google group archives without success. Any ideas? Many thanks David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to keep focus on txt_box in userform | Excel Programming | |||
Object on userform can't get focus | Excel Programming | |||
Show userform without it taking focus? | Excel Programming | |||
Focus on Control before UserForm(s) pop up | Excel Programming | |||
UserForm Loss Focus | Excel Programming |