LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 102
Default Where do I find the commands for a macro

Try this instead.
Keep the other _SelectionChange macro.


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = Cells(Rows.Count, 2).End(xlUp).Row _
Then Target(1, 4).Select
End Sub


Here is an explanation on how these two worksheet event codes work.
When you change a cell by either deleting or adding content the _Change event is fired.
In the one above, it fires when the condition is triggered only if the change takes place at the end of B column - then move to column E on the same row.
The _SelectionChange event fires each time a different selection is made on the sheet.
In the one provided it only fires if the selected cell is in a column more than 11. And then it simply returns you to the cell immediately below your first entry in B column.
You might have more control over this if you place a value in some cell - say A1 for the column value - then use [A1] in the code instead of 11.
GL


Regards
Robert McCurdy
"Pat" wrote in message ...
I pasted both in the sheets code module. I tested it by entering a number in
an open cell in column b. After I hit enter the cursor moved up on row to
column F .

If I enter a no in column f and hit enter the cursor goes to column G and
waits. If I hit enter until I get to Column K and either hit enter or enter
a number and hit enter the cursor goes back to the next cell in Column B.



 
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 can i memorise the Macro Commands? Angel Excel Discussion (Misc queries) 3 January 16th 08 02:14 PM
How do I call MS DOS commands from Macro. MrDan8 Excel Discussion (Misc queries) 2 June 27th 06 07:37 PM
Macro Commands danh Excel Discussion (Misc queries) 5 June 22nd 06 02:00 PM
macro commands Amir Excel Discussion (Misc queries) 2 April 3rd 06 10:58 AM
invisible macro commands? Julieeeee Excel Worksheet Functions 4 October 24th 05 11:21 PM


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