ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   changing sheet in window without activating it (https://www.excelbanter.com/excel-programming/339868-changing-sheet-window-without-activating.html)

rumi

changing sheet in window without activating it
 
Hi there!
I'm trying to write a code that changes the active sheet in specified
window. The only way that i can do it is, as I think, the sipmliest,
just like that:

sub change_sheet()
set myWindow = ActiveWindow
Windows("DesiredWindow").Activate
Sheets("DesiredSheet").Activate
myWindow.Activate
end sub

I wonder if there's a way to avoid changing windows and simply change
the sheet in the desired window to avoid "blinking" of windows. And i'm
not thinking about setting "screenupdating" property to "false". I
thought that Windows("DesiredWindow").Sheets("DesiredSheet").Ac tivate
or something like that should work but it isn't.

Thanks in advance

rumi



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

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