sheet code problem
Because Range("A1").Select refers to the sheet containing the code, which
isn't the activesheet at that time
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Sheets("Sheet2").Select
Sheets("Sheet2").Range("A1").Select
End Sub
--
Regards,
Tom Ogilvy
"Stuart" wrote in message
...
with the following procedure entered into the sheet code of "Sheet1" the
method fails why?
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Sheets("Sheet2").Select
Range("A1").Select
End Sub
I can enter the above code into a normal macro in a normal module then
call
that sub fro the sheet code. but that seems daft, why doesn't it work
directly?
stuart
|