PC Review


Reply
Thread Tools Rate Thread

automatically advance to next cell

 
 
=?Utf-8?B?am1pbGxlcjg=?=
Guest
Posts: n/a
 
      20th Aug 2007
Is there a way to limit a cell to only one character then automatically
advance to the next cell after a single character is entered.
 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      20th Aug 2007
No

Excel has no way of knowing you are finished editing a cell until you leave that
cell by enter, arrow or tab.


Gord Dibben MS Excel MVP


On Mon, 20 Aug 2007 10:32:04 -0700, jmiller8
<(E-Mail Removed)> wrote:

>Is there a way to limit a cell to only one character then automatically
>advance to the next cell after a single character is entered.


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      20th Aug 2007
But you could create a userform that allows the user to only enter a single
character. The goes to the next cell.

If you want to try, is there a list of specific characters that can be used?

And what does "next cell" mean?

The one to the right of the activecell???
The one beneath the activecell???

jmiller8 wrote:
>
> Is there a way to limit a cell to only one character then automatically
> advance to the next cell after a single character is entered.


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?am1pbGxlcjg=?=
Guest
Posts: n/a
 
      21st Aug 2007
Dave
It could be any letter or number and by next cell I mean the cell to the
right of the active cell. Thanks for your quick reply

"Dave Peterson" wrote:

> But you could create a userform that allows the user to only enter a single
> character. The goes to the next cell.
>
> If you want to try, is there a list of specific characters that can be used?
>
> And what does "next cell" mean?
>
> The one to the right of the activecell???
> The one beneath the activecell???
>
> jmiller8 wrote:
> >
> > Is there a way to limit a cell to only one character then automatically
> > advance to the next cell after a single character is entered.

>
> --
>
> Dave Peterson
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      21st Aug 2007
Modified from a previous post:

Create a small userform with a single textbox on it. Use the X button to close
the userform.

Put this code in a General module show the userform:

Option Explicit
Sub testme01()
UserForm1.Show
End Sub

Add this code to the userform module:

Option Explicit
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)

Select Case KeyAscii
'only 0-9, a-z, and A-Z
Case Asc("0") To Asc("9"), Asc("a") To Asc("z"), Asc("A") To Asc("Z")
With ActiveCell
.Value = Chr(KeyAscii)
'if you want to fill A:E, you could use
'If ActiveCell.Column = 5 then '5 is column E
'or
'use this for all columns.
If ActiveCell.Column = Columns.Count Then
ActiveCell.EntireRow.Cells(1).Offset(1, 0).Activate
Else
.Offset(0, 1).Activate
End If
End With
End Select
KeyAscii = 0
TextBox1.Value = ""

End Sub
If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Debra Dalgleish has some getstarted instructions for userforms at:
http://contextures.com/xlUserForm01.html


jmiller8 wrote:
>
> Dave
> It could be any letter or number and by next cell I mean the cell to the
> right of the active cell. Thanks for your quick reply
>
> "Dave Peterson" wrote:
>
> > But you could create a userform that allows the user to only enter a single
> > character. The goes to the next cell.
> >
> > If you want to try, is there a list of specific characters that can be used?
> >
> > And what does "next cell" mean?
> >
> > The one to the right of the activecell???
> > The one beneath the activecell???
> >
> > jmiller8 wrote:
> > >
> > > Is there a way to limit a cell to only one character then automatically
> > > advance to the next cell after a single character is entered.

> >
> > --
> >
> > Dave Peterson
> >


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set excel to automatically advance to the next cell? =?Utf-8?B?Q2FybGwxMDU4?= Microsoft Excel Misc 1 8th Apr 2006 08:50 AM
how do I automatically advance data to next cell when overwritten =?Utf-8?B?dG9kYXkoKQ==?= Microsoft Excel Programming 0 19th Oct 2005 03:26 PM
automatically advance to next cell without hitting enter or tab corby Microsoft Excel Setup 4 29th May 2004 03:09 AM
automatically advance to next cell without hitting enter or tab corby Microsoft Excel Misc 4 29th May 2004 03:09 AM
automatically advance to next cell without hitting enter or tab corby Microsoft Excel Worksheet Functions 4 29th May 2004 03:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:02 AM.