How to make A1 the active cell in all visible worksheets ?

L

Luc

......so that when i activate the sheet A1 is the cell in the upper left corner of my screen.

Thanx
 
P

Patrick Molloy

in the dev environment (ALT+F11) open the project explorer (Ctrl+R), then right click the icon for ThisWorkbook and select View Code
add this code|:

Option Explicit
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Range("A1").Select
End Sub
.....so that when i activate the sheet A1 is the cell in the upper left corner of my screen.

Thanx
 
M

Mike H

Hi,

ALT+F11 to open VB editor. Double click 'ThisWorkbook' and paste the code in
on the right

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.Goto ActiveSheet.Range("A1"), scroll:=True
End Sub

Mike
 
L

Luc

Patrick, Mike : Thanks for your help !!!!

Luc


Mike H said:
Hi,

ALT+F11 to open VB editor. Double click 'ThisWorkbook' and paste the code
in
on the right

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.Goto ActiveSheet.Range("A1"), scroll:=True
End Sub

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top