LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default focus?

hi, i have a 6 text boxes which i only allow number to be entered. Bu
how can i make it so that when the user clicks accept, and a textbo
has a value higher than 16 or lower than 0, that box is selected; ha
focus?

here is what i have:

If Val(Sheet3.txtU1) 16 Or Val(Sheet3.txtU1) < 0 Then
MsgBox "Please enter a number between 0 and 16 for Unit 1."
vbOKOnly, "Invalid Value"
Sheet3.txtU2.SetFocus
End If

but set focus dosn't work. thanks for any help

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
focus Capp Excel Discussion (Misc queries) 2 November 18th 05 07:25 PM
set focus tkaplan Excel Discussion (Misc queries) 3 September 27th 05 07:41 PM
Set Focus gregork Excel Programming 2 March 7th 04 05:29 AM
How do I set focus Newbie Excel Programming 2 February 11th 04 07:03 PM
set focus RickK Excel Programming 1 October 10th 03 12:27 PM


All times are GMT +1. The time now is 08:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"