Hey everyone,
The following code helps in arranging the columns across multiple sheets to be same as active sheet when enter is pressed on a cell. Code being perfect however is tedious due to repetitive pressing of the Enter Key. Instead I could think of whenever the active sheet is exited and a new sheet is selected then run the code only for the new sheet. hence, the new sheet will now have the same column selected as the last sheet with even same positioning of the scrolling aswell. for mroe reference please refer to the link of my OP
https://www.mrexcel.com/forum/excel-questions/1083556-select-same-column-across-multiple-sheets.html
Would it be possible?
Thank you.
The following code helps in arranging the columns across multiple sheets to be same as active sheet when enter is pressed on a cell. Code being perfect however is tedious due to repetitive pressing of the Enter Key. Instead I could think of whenever the active sheet is exited and a new sheet is selected then run the code only for the new sheet. hence, the new sheet will now have the same column selected as the last sheet with even same positioning of the scrolling aswell. for mroe reference please refer to the link of my OP
https://www.mrexcel.com/forum/excel-questions/1083556-select-same-column-across-multiple-sheets.html
Code:
[COLOR=#333333][I]Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Source As Range)[/I][/COLOR] Dim ws As Worksheet, c As Long
c = ActiveWindow.VisibleRange.Column
Application.ScreenUpdating = False
For Each ws In Sheets
ws.Select
Cells(ActiveCell.Row, Source.Column).Select
ActiveWindow.SmallScroll ToLeft:=Columns.Count
ActiveWindow.SmallScroll ToRight:=c - 1
Next
Sh.Select
Application.ScreenUpdating = True [COLOR=#333333][I]End Sub[/I][/COLOR]
Would it be possible?
Thank you.