ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Cursor position? (https://www.excelbanter.com/excel-discussion-misc-queries/19397-cursor-position.html)

Marc

Cursor position?
 
I would like that when I open workbook, cursor and view appears from first
cell (A1). I have put in workbook open event Range("A1").Select , but
workbooks open in the middle (vertical) of worksheet, depending where is
cursor when I exit workbook.

I hope I explained well, I want that I can see cell A1 when I open workbook,
and that workbook doesn't open in middle of worksheet.

If someone can help?

Thank you



John Mansfield

Marc,

Try this - add the macro to the ThisWorkbook module of your workbook. Save
the workbook, close it and reopen it. All sheets should open up to cell A1.

Private Sub Workbook_Open()
Dim A As Worksheet
Application.ScreenUpdating = False
For Each A In Worksheets
A.Activate
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollRow = 1
Range("A1").Select
Next A
Sheets(1).Select
Application.ScreenUpdating = True
End Sub

----
Regards,
John Mansfield
http://www.pdbook.com


"Marc" wrote:

I would like that when I open workbook, cursor and view appears from first
cell (A1). I have put in workbook open event Range("A1").Select , but
workbooks open in the middle (vertical) of worksheet, depending where is
cursor when I exit workbook.

I hope I explained well, I want that I can see cell A1 when I open workbook,
and that workbook doesn't open in middle of worksheet.

If someone can help?

Thank you





All times are GMT +1. The time now is 09:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com