Excel crashes on simple procedure
"Mark Lincoln" wrote:
I've had problems in the past with Excel and focus, sometimes to the
point of causing me to fundamentally restructure my code.
Here's a wild guess. Try swapping these two lines:
cmbDesc.Visible = False
NewInventory.Cells(9, 5).Select
So that you select the cell first, then hide the combo box. Then cross
your fingers and run the code. If that doesn't work, try commenting
out the "cmbDesc.Visible = False" line and see if the crashing goes
away.
Daves_Solutions wrote:
Everytime I run the following procedure excel crashes.
Private Sub cmbDesc_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal
Shift As Integer)
If KeyCode = 9 Then
NewInventory.Cells(9, 4) = cmbDesc.Text
cmbDesc.Visible = False
NewInventory.Cells(9, 5).Select
End If
End Sub
I have several other procedures that are similar that run fine. All I am
trying to do is send the focus to the next cell in an invoice that I created
from an embedded combo box.
Any suggestions or help would be greatly appreciated. Thank you in advance
for your time.
Dave
Thanks it works on my computer I will try tomorrow on the computer that is supposed to run this program. It runs fine on three of my computers but not the one I need it too...
thanks for your time and help.
Dave
|