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

PATRICK

You wrote this

The code doesn't need to be complex. First test that its
a number, then count the digits.


Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$J$7" Then '[A]

If IsNumeric(Target.Value) Then '[b]

If Len(Target.Text) = 3 Then '[C]

Range("C11").Select
Exit Sub

End If '[C]

End If '[b]

MsgBox "Enter a three digit number please"

End If '[A]

End Sub



QUESTION:
How do you select a group of cells

--
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
On opening a worksheet move focus to a cell based on date davcas Excel Worksheet Functions 1 July 1st 08 02:18 PM
Type set amount of digits in one cell then automatically move to n mulligbo Excel Worksheet Functions 2 October 28th 06 12:04 AM
Type 3 digits in one cell then automatically move to next cell. mulligbo Excel Discussion (Misc queries) 4 October 27th 06 11:51 PM
The screen should not move to focus on column using when typing Andeamay Excel Discussion (Misc queries) 1 November 7th 05 01:46 AM
must press enter 2x to move cell focus Lynn Excel Discussion (Misc queries) 0 March 18th 05 06:05 PM


All times are GMT +1. The time now is 09:21 AM.

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"