VBA .activate
Put the following event macro in the worksheet code area:
Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set d = Range("D:D")
If Intersect(t, d) Is Nothing Then Exit Sub
If t.Value = "" Then Exit Sub
Sheets(1).Activate
End Sub
--
Gary''s Student - gsnu200835
"terilad" wrote:
Hi,
I am needing some help with a code, I have 150 sheets in a workbook in
relation to stock items, I have 4 columns of date I need to enter into these
sheets. e.g.
Date Stock +/- Stock Total Initials
These are the 4 headings of the columns, what I am looking to do is that I
fill in Date and Stock +/- after that I want to put in initials of person
removing stock e.g KJ then after I have input the initials and hit enter I
want to activate so that after initials are input it will automatically
return to sheet1 "Index of Stock"
Can anyone help me on this code?
Many thanks
Terilad
|