View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim[_44_] Tim[_44_] is offline
external usenet poster
 
Posts: 28
Default How to populate an MSForms.ReturnInteger value

I want to call

Private Sub txtFileID_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)

from a separate routine, something like ...

Private Sub cmdClear_Click()
Dim KeyCode As MSForms.ReturnInteger

Set KeyCode = 107 '+
KeyDown txtFileID_KeyDown KeyCode, 0
End Sub

But am having trouble assigning a value to KeyCode. I tried KeyCode =
107 and Set Keycode = 107 but the object objects. How do I do this
task?