View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default i need to record a macro to....

'-----------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
'-----------------------------------------------------------------

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Address = "$F$4" Then
Worksheets("Sheet2").Activate
Worksheets("Sheet2").Range("E2").Select
ElseIf Target.Address = "$F$5" Then
Worksheets("Sheet2").Activate
Worksheets("Sheet2").Range("F2").Select
ElseIf Target.Address = "$F$6" Then
Worksheets("Sheet2").Activate
Worksheets("Sheet2").Range("G2").Select
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.




--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"tinkerbellsmyhoe" wrote in message
ups.com...
hello,

i have looked endlessly on a way to perform a simple task. PLEASE
HELP!

when i click on a cell in sheet 1, i would like to move to a certain
cell of sheet 2.

if i click on F4 in sheet 1, the i would like to select cell E2 in
sheet 2.
if i click on F5 in sheet 1, the i would like to select cell F2 in
sheet 2.
if i click on F6 in sheet 1, the i would like to select cell G2 in
sheet 2.

and so on.


THANKS IN ADVANCE!!!
Mike C.