Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don Don is offline
external usenet poster
 
Posts: 487
Default Move from one cell to another

I use Excel but never program in it. However, I use VBA in Microsoft Access
a lot.

Can someone get me started and tell me the syntax to program a spreadsheet
to move the focus from one cell to another once something is entered into the
first cell? Thanks in advance.
--
Don Rountree
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Move from one cell to another

Here is a program I wrote for somebody this morning that have lots of features.

Sub zip_code()
Dim Cell_Data As String

zipcode_count = 0
For Each MyWorksheet In Workbooks(ThisWorkbook.Name).Worksheets
If StrComp("Summary", MyWorksheet.Name) < 0 Then
RowCount = 1

Do While StrComp(MyWorksheet.Range("C1"). _
Offset(rowOffset:=RowCount - 1, columnOffset:=0), "End") < 0

Cell_Data =
MyWorksheet.Range("C1").Offset(rowOffset:=RowCount - 1, columnOffset:=0).Value
If Len(Cell_Data) = 5 Then

Found_Char = False

For char_count = 1 To 5
character = Mid(Cell_Data, char_count, 1)
If (character < "0") And (character "9") Then
Found_Char = True
Exit For
End If
Next char_count

If Found_Char = False Then

Worksheets("Summary").Range("C1").Offset(rowOffset :=zipcode_count, _
columnOffset:=0) = Cell_Data
zipcode_count = zipcode_count + 1

End If

End If

RowCount = RowCount + 1


Loop
End If
Next MyWorksheet

End Sub


"Don" wrote:

I use Excel but never program in it. However, I use VBA in Microsoft Access
a lot.

Can someone get me started and tell me the syntax to program a spreadsheet
to move the focus from one cell to another once something is entered into the
first cell? Thanks in advance.
--
Don Rountree

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Move from one cell to another

It should do that automatically if under tools=Options=Edit tab, you
haven't unchecked "move selection after enter"

--
Regards,
Tom Ogilvy


"Don" wrote:

I use Excel but never program in it. However, I use VBA in Microsoft Access
a lot.

Can someone get me started and tell me the syntax to program a spreadsheet
to move the focus from one cell to another once something is entered into the
first cell? Thanks in advance.
--
Don Rountree

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
How do I move from cell A 10 to cell B1 with one move or click chipsdad Excel Worksheet Functions 3 June 6th 09 03:43 AM
Arrow keys move screen instead of moving from cell to cell LuisGe Excel Discussion (Misc queries) 3 May 22nd 09 11:17 PM
Move shape, object, pic to center of new cell based on cell value zzxxcc Excel Programming 4 July 7th 06 12:58 PM
arrow keys move entire sheet instead of cell to cell gbeard Excel Worksheet Functions 2 April 13th 05 04:59 PM
Arrow keys move screen instead of moving from cell to cell. JaJay777 Setting up and Configuration of Excel 1 January 17th 05 06:48 PM


All times are GMT +1. The time now is 07:47 AM.

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

About Us

"It's about Microsoft Excel"