ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Bound column does not work after hiding form (https://www.excelbanter.com/excel-programming/284829-bound-column-does-not-work-after-hiding-form.html)

TerryK[_2_]

Bound column does not work after hiding form
 
I have some comboboxes that are filled from an arra
When I select an item from the drop down list the value of the bound column appears in a textbo

I then hide the form to allow the user to do some work on a spreadshee
I then display it again with the UserForm.Show comman

Problem
Although all information in the comoboxes is retained - the bound column no longer work
It appears that the cursor has moved one space to the right and the string is no longer recognized as being in the dropdown list
If I edit the value manually and backspace once - the bound column works

Any ideas how fix this

TerryK

Bill Manville

Bound column does not work after hiding form
 
TerryK wrote:
It appears that the cursor has moved one space to the right and the string is no longer recognized as being in the dropdown list.


Sounds like someone has used SendKeys " " ???
What happens if you move the focus from the combobox before hiding the form?

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup


TerryK[_2_]

Bound column does not work after hiding form
 
Bill,
There is no SendKeys code in the project. Is this something that Excel would do behind the scenes? If so is there a method to disable it?

TerryK

TerryK[_2_]

Bound column does not work after hiding form
 
Bill,
I forgot to respond to your question
"What happens if you move the focus from the combobox before hiding the form?"

This does not appear to be the issue. There are about 12 comboboxes on the form and they are all affected in the same manner. So which control has the focus does not seem to come into play.

TerryK



Bill Manville

Bound column does not work after hiding form
 
TerryK wrote:
There is no SendKeys code in the project. Is this something that Excel would do behind the scenes?


No.
Sorry. Out of ideas.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup


TerryK[_2_]

Bound column does not work after hiding form
 
Bill,
Thanks for your input. Your thoughts gave me a new command and a solution.
This is crude but it works.

FormInput.ComboBoxVersaLam1.Text = Range("d16")
FormInput.ComboBoxVersaLam1.SetFocus
SendKeys "{bs}"

TerryK


All times are GMT +1. The time now is 09:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com