Hi to all,
I have
>>> use code - tags <<<
And the sheet is protected.
I don't understand why, sometimes when the user opens the file, the visible columns are not A, B, C (as when I created and protected the sheet), etc but C, D, E, etc.
This happens to me with Excel 2019 that I have at home and with Excel 2010 that I have at work.
I thought of "forcing" a scroll by using this code:
And this works well in Excel 2019 and 2010.
The problem arises when I want to freeze the scroll area and add this last row of code, because it works in Excel 2019 but not in Excel 2010 that I have in the office:
In Excel 2010 I have a run time error "not supported method" (I'm not sure about the actual error translation because I use Excel in Italian).
How could I write the code to define the scroll area and at the same time have it "fixed" all the times as it should be?
Thank you.
I have
>>> use code - tags <<<
Code:
ThisWorkbook.Worksheets("SOMMA 1").ScrollArea = "C3:C302" in Private Sub Workbook_SheetActivate(ByVal Sh As Object)
I don't understand why, sometimes when the user opens the file, the visible columns are not A, B, C (as when I created and protected the sheet), etc but C, D, E, etc.
This happens to me with Excel 2019 that I have at home and with Excel 2010 that I have at work.
I thought of "forcing" a scroll by using this code:
Code:
ThisWorkbook.Worksheets("SOMMA 1").Select
Range("A1").Select
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 1
And this works well in Excel 2019 and 2010.
The problem arises when I want to freeze the scroll area and add this last row of code, because it works in Excel 2019 but not in Excel 2010 that I have in the office:
Code:
ThisWorkbook.Worksheets("SOMMA 1").ScrollArea = "C3:C302"
How could I write the code to define the scroll area and at the same time have it "fixed" all the times as it should be?
Thank you.
Last edited by a moderator: