Auto run of macros immediately after opening the files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hai
i saved the worksheet by placing the cursor at some cell (say a200) and i
had closed the file. If i open the file, the cursor/worksheet should start
from first cell (say a1) or any cell which i assign
Pls help me to solve my problem
 
Hey gane
to do that, open your excel sheet, press Alt + F11,
then you should see on the left side your sheets and
the whole workbook, if not press ctrl+r....double click
on the workbook and choose instead of (General) -->
workbook. this should lead to this:
---------------------------------------------------
Private Sub Workbook_Open()

End Sub
---------------------------------------------------
Now you can paste following between those lines:
---------------------------------------------------
ActiveSheet.Range("A1").Select
---------------------------------------------------
Where you can change the Range to what you want.

Close the workbook and reopen it.

hth

Carlo
 
Sub Workbook_Open()
'Do your stuff here...

Application.Quit
Sub End


Right-click on sheet 'View Code'
Private Sub Auto_Open()
'Stuff
Sub End
 
Back
Top