ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting first Unlocked Cell (https://www.excelbanter.com/excel-programming/319639-selecting-first-unlocked-cell.html)

jkitzy

Selecting first Unlocked Cell
 
I have the following macro in my workbook:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Application.WindowState < xlMaximized Then Application.WindowState = _
xlMaximized
Range("A1:N1").Select
ActiveWindow.View = xlPageBreakPreview
ActiveWindow.Zoom = True
Range("b8").Select
End Sub

What this does is
1) makes sure the app is maximized, as well as the "width" of the first page
(A1:N1).

2) makes sure that the screen (which has is frozen at row 7) shows the first
row under the frozen headers.

But what I can't seem to get it to do is this: After I get my display right,
I want the first Unlocked cell on the page to be the selection or activated
cell. This is different on each worksheet.

Suggestions?


All times are GMT +1. The time now is 07:35 AM.

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