Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto return to sheet 1

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Auto return to sheet 1

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

"Simon Lloyd" wrote:


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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto return to sheet 1


Simon Lloyd's Profile: 'The Code Cage Forums - View Profile: Simon

Lloyd' (http://www.thecodecage.com/forumz/member.php?userid=1)
View this thread: 'Auto return to sheet 1 - The Code Cage Forums'

(http://www.thecodecage.com/forumz/sh...ad.php?t=68280)



--
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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Auto return to sheet 1

On Feb 24, 2:10*pm, Terielad
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


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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Auto return to sheet 1

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

"Simon Lloyd" wrote:


Simon Lloyd's Profile: 'The Code Cage Forums - View Profile: Simon

Lloyd' (http://www.thecodecage.com/forumz/member.php?userid=1)
View this thread: 'Auto return to sheet 1 - The Code Cage Forums'

(http://www.thecodecage.com/forumz/sh...ad.php?t=68280)



--
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


Reply
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
Excel sheet setup, need only 2 columns with auto-tab and return Seaghost Excel Discussion (Misc queries) 1 October 12th 09 12:09 PM
Select sheet, Pause till Enter pressed, return to previous sheet Russ3Z Excel Programming 1 June 12th 07 11:06 PM
Auto return Richo Excel Worksheet Functions 9 February 19th 07 06:48 PM
"Auto-return" Jaytee Excel Discussion (Misc queries) 3 September 11th 05 06:00 PM
Auto Return Auto Return Excel Discussion (Misc queries) 1 September 8th 05 08:36 PM


All times are GMT +1. The time now is 06:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"