View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
kkknie[_43_] kkknie[_43_] is offline
external usenet poster
 
Posts: 1
Default Command button macro query

If I read the original post correctly, the user will be entering mor
than one piece of data in the lower rows. Therefore the simpl
worksheet_change suggestion probably won't do the trick. (You did sa
it was only to get them started...)

But, building on it a bit, you could use an array and save the last 1
positions (or more if you wanted). My solution doesn't have a "g
forward" option, but it could be implemented using an array inde
pointer. Give this a shot:


Code
-------------------
Dim adrLast(10) As String

Private Sub Worksheet_Change(ByVal Target As Range)

Dim i As Integer

For i = 1 To 10
adrLast(i) = adrLast(i - 1)
Next
adrLast(0) = Target.Address

End Sub

Sub GoBack()

Dim i As Integer

Range(adrLast(0)).Select
For i = 1 To 10
adrLast(i - 1) = adrLast(i)
Next

End Su
-------------------

Also in the worksheet module of the worksheet in question just lik
Anders suggested

--
Message posted from http://www.ExcelForum.com