Forms-Compile error: user-def type not defined

T

Tita_Guera

I copied the following code from www.contextures.com/xlDAtaVal14.html--but i
rcv the error above.

I just copied the subroutine so that the cursor moves to the next cell if
tab or enter key are pressed. i am not familiar with VBA code, so i hv no
idea what i need to revise:

====================================
'Optional code to move to next cell if Tab or Enter are pressed
'from code by Ted Lanham
Private Sub TempCombo_KeyDown(ByVal _
KeyCode As MSForms.ReturnInteger, _
ByVal Shift As Integer)
Select Case KeyCode
Case 9 'Tab
ActiveCell.Offset(0, 1).Activate
Case 13 'Enter
ActiveCell.Offset(1, 0).Activate
Case Else
'do nothing
End Select
End Sub

thank you/Maria
 
M

Michael

The code on its own will not work. You will have to recreate the whole
example in order for it work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top