View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_1043_] Simon Lloyd[_1043_] is offline
external usenet poster
 
Posts: 1
Default Auto return to sheet 1


Simply use Sheets("Index of Stock").Activate
at the end of the code in your Worksheet_SelectionChange.

Terielad;244822 Wrote:
I have the following macro in 130 sheet codes, what I am looking for is
when
an entry is put into cells D7:D500 recognised as the the last entry I
input
when I hit enter and data is input I need to bring up sheet 1 which is
named
Index of Stock. Can anyone help me on this??

Here is the code.


Private Sub Worksheet_Calculate()
With Me.Range("A1")
If .Value < "" Then
Me.Name = .Value
End If
End With
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A7:A500")) Is Nothing Then Target.Value
= Date
End Sub


Many thanks



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=68280