Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hitting Enter in Cell then Select Sheet 1???!!!

Status
Not open for further replies.

tellbiz

Technical User
Jun 10, 2002
1
US
Ok if we enter data into sheet2 cell h3 and when the user hits the enter key... how do I have it activate Sheet 1??

Thanks,
Sean
 
Hi,

In the Sheet Object for Sheet2, in the Worksheet_Change event, paste this code...
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Set rng = Application.Intersect(Target, Range("H3"))
    If Not rng Is Nothing Then ActivateSheet
End Sub
In a new module paste this code...
Code:
Sub ActivateSheet()
    Worksheets("Sheet1").Activate
End Sub
VOLA!


Skip,
Skip@TheOfficeExperts.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top