Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 138
Default How can I advance to the next field automatically?

Would it be a solution to have a separate input cell, where you would input
the name normally (typing continuously, then ENTER)?
The one-letter cells, where you want to end up each character of the entered
name would contain formulas to extract the characters. Data validation is
not required anymore.

Example:
Input cell is A1. Cells B1, C2.... contain the fomulas =MID(A1,1,1) ,
=MID(A1,2,1) etc.

Cheers,

Joerg Mochikun


"Martin Fishlock" wrote in message
...
Hi,

This is not a very elegant way of doing it and I await nicer solutions:

In the worksheet (or workbook) code sheet paste the following.

Sub Worksheet_Activate()
Application.OnKey "A", "Move_A"
Application.OnKey "a", "Move_a"
Application.OnKey "B", "Move_B"
'$B!D(B. For every key!!!!$B!D(B.
End Sub

Sub Worksheet_Deactivate()
Application.OnKey "A"
End Sub

Thes are in a seperate module (can't get it to work in the worksheet code)
paste the following:

Sub MoveR(c as string)
Application.EnableEvents = False
ActiveCell = c
ActiveCell.Offset(0, 1).Activate
Application.EnableEvents = True
End Sub

Sub Move_A()
MoveR("A")
End Sub
Sub Move_a()
MoveR("A")
End Sub
Sub Move_B()
MoveR("A")
End Sub

There needs to be some tidying up and careful reviewing of the events you
may also need to check the target address to ensure you only deal with the
cells that require special treatment.

I watch with interest on improvements on getting the keystroke or
dynamically calling a macro with onkey (not worked for me as in

application.onkey "mover(""A"")"

--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"crowzhome" wrote:

I have a template that I have created that is to be used for data entry.

I
have a validation on each cell that allows no more than one character.

What
I would like happen is once that character is entered, it automatically

goes
to the next cell w/o having to use the Enter/Tab/Arrow Rgt keys.

For example, for the last name, there is a field for each alpha of the

last
name and right now I have to enter each alpa and then tab to the next

field
and type in the second letter of the last name and then so on and so on.

I
just want to be able to type continuously and have each alpha placed in

the
corresponding column.

I know there has to be a way. Any help would be appreciated.



Reply
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
Is there a way to automatically advance a number when printing? Brian Smith Excel Worksheet Functions 1 November 22nd 06 11:13 PM
Display the source for a pivot table page field Gary Brown Excel Worksheet Functions 4 November 8th 06 03:02 PM
pivot chart is it possible to hide individual field buttons? Layout Field buttons Matt Charts and Charting in Excel 0 August 27th 06 02:57 PM
Conditional Formatting of Pivot Table Field jdanderson02 Excel Discussion (Misc queries) 2 February 9th 06 08:41 PM
how can i automatically insert cell values into a comment field? spot987654321 Excel Discussion (Misc queries) 1 June 3rd 05 11:10 PM


All times are GMT +1. The time now is 08:43 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"