View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default set focus on txt field

You said you are using the Exit event, so use the functionality provided:

if variable=false then
Cancel = True
End if

causes focus to remain on the textbox.

--
Regards,
Tom Ogilvy


"tkaplan" wrote in
message ...

txtauditor.setfocus 'sets the focus to the text box

this is the line that doesn't work.

i got around it by setting the cancel to true but i cant figure out why
it's not letting me use the setfocus method.


--
tkaplan
------------------------------------------------------------------------
tkaplan's Profile:

http://www.excelforum.com/member.php...o&userid=22987
View this thread: http://www.excelforum.com/showthread...hreadid=471137