Hi
This will work
Don't use Onkey for a macro name because Excel think it is code
In your other code you have a typo ( , after Application.OnKey )
Sub OnKeySub2()
Application.OnKey "{Tab}", "Update"
End Sub
Sub Update()
MsgBox ""
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl
"bforster1 " wrote in message ...
I have put the following code in the module of my main userform;
Sub OnKey
Application.Onkey, "{Tab}", "Update"
End Sub
Sub Update()
TextBox586.Value = Worksheets("IncStmtSummary").Range("F5")
TextBox586.Text = Format(TextBox586.Text, "$#,##0")
End Sub
I am attempting to have TextBox586 update whenever the Tab key is
pressed. It does not work. Any suggestions. Does it matter where I
put the code??
Thanks.
---
Message posted from http://www.ExcelForum.com/