View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Textbox change event

A number of ways.

You could try the AfterUpdate or Exit events, although this assumes another
control to move to.

Another way is to use the Keydown event, and trap for enter (KeyCode of 13)
and run your code when that is pressed.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Ian Mangelsdorf" wrote in message
om...
Hi again

I have set up a user form for users to enter smaple data. The form has
a text box for entering the sample number and I am using various code
to update the data as the sample number is changed using the
textbox.change event. All works well if I stick to stepping one sample
at a time, however if the user wants to enter a sample number and view
the data I run into problems! If the user wants to view say sample 54
and there is no 5 then the code falls over (no erros just reports that
sample 5 does not exist) From what I can gather the change event works
on each key stroke.

I cant find a textbox event to delay or allow multiple key stokes
before acting. Is there anohter way to achive what im tryin to do??

using Excel 2003

Thanks in Advance

Ian