DataAmatuer
New member
- Local time
- Today, 16:30
- Joined
- Feb 15, 2021
- Messages
- 16
It turned out that the combo box would STILL close sometimes even when I commented-out the On Timer event and had the On Load event call the Public Sub Dropdown(), which used the ".Dropdown" command. Since discovering that there were still inexplicable cases of the combo box not staying open, I commented-out the ".Dropdown" command and replaced it with a SendKeys statment that effectively keys in F4, which is the keyboard shortcut to open a combo box. This seems to work (but because if the intermittent nature of the problem, I'm not yet confident that it will keep on working!). Here's the code now:I seldom use the timer event because I find it causes problems. I also recall that when I first started programming the general consensus was not to use the Timer. I have no idea what the latest advice is.
Code:
Public Sub Dropdown()
' Me.cboCkInsCo.Dropdown
SendKeys "{F4}"
DoEvents
End Sub