Auto return to sheet 1

T

Terielad

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
 
T

Terilad

Can you please explain how I would insert this into my code at the moment,
please dispaly an example, as I need the date macro to remain.

Regards
 
C

CurlyDave

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

Did you know about the WorkBook Module?
Then you would have just entered the code once...

Private Sub Workbook_SheetCalculate(ByVal Sh As Object)

End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Range)

End Sub
 
T

terilad

This is not doing what I require, I revised my code and whatever cell I
select it returns to the index of stock, yes this is what I require but only
on cells D7:D500 and after I input initials.

Any other ideas??

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top