ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing the focus in an inactive sheet. (https://www.excelbanter.com/excel-programming/382328-changing-focus-inactive-sheet.html)

AVR

Changing the focus in an inactive sheet.
 
I am working in a workbook with multiple sheets. A change event in sheet A
triggers some manipulations of data and ranges in sheet B. It also changes
the cell selection the next time sheet B is activated. Is there a way to set
the selected cell for the next opening of sheet B, without having it reset
every time sheet B is activated. Ideally, I would like to do it without
sheet B having to "flash" open to the user.

Tom Ogilvy

Changing the focus in an inactive sheet.
 
Sub SetActiveCell()
application.ScreenUpdating = False
set sh = Activesheet
With Worksheets("Sheet B")
.Select
.Range("F9").Select
End with
sh.Activate
Application.ScreenUpdating = True
End sub

--
Regards,
Tom Ogilvy




"AVR" wrote:

I am working in a workbook with multiple sheets. A change event in sheet A
triggers some manipulations of data and ranges in sheet B. It also changes
the cell selection the next time sheet B is activated. Is there a way to set
the selected cell for the next opening of sheet B, without having it reset
every time sheet B is activated. Ideally, I would like to do it without
sheet B having to "flash" open to the user.


merjet

Changing the focus in an inactive sheet.
 
Is the change event of Sheet A due to VBA code? If yes, modify the
code to capture Sheet B's ActiveCell address at the start and reselect
said ActiveCell at the end.

Hth,
Merjet



merjet

Changing the focus in an inactive sheet.
 
Is the change event of Sheet A due to VBA code? If yes, modify the
code to capture Sheet B's ActiveCell address at the start and reselect
said ActiveCell at the end.

Hth,
Merjet




All times are GMT +1. The time now is 10:14 PM.

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