ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open two tiled windows on workbook_open (https://www.excelbanter.com/excel-programming/410385-open-two-tiled-windows-workbook_open.html)

pdberger

Open two tiled windows on workbook_open
 
Good afternoon.

I'm creating a workbook that will automatically open two windows (one for
reference data that I don't want to scroll along with the other) to be used
by several users. The complicating factor is that each user will name
his/her copy differently, so I don't know in advance the name (s)he'll give
it. I've created a string variable called strWorkbookName, but can't figure
out how to get it into a variation of:

Windows("Book2:1").Activate

At least I think that's the right direction, and the statement with which
the problem lies. Any help would be appreciated.



[email protected]

Open two tiled windows on workbook_open
 
Dim strWorkbookName As Workbook
Set strWorkbookName = "C:\My Documents\My File.xls"
'or
'Set strWorkbookName = Workbooks.Open("C:\My Documents\My File.xls")

strWorkbookName.Activate

Maybe this will help.

Alan



On May 2, 3:32*pm, pdberger
wrote:
Good afternoon.

I'm creating a workbook that will automatically open two windows (one for
reference data that I don't want to scroll along with the other) to be used
by several users. *The complicating factor is that each user will name
his/her copy differently, so I don't know in advance the name (s)he'll give
it. *I've created a string variable called strWorkbookName, but can't figure
out how to get it into a variation of:

Windows("Book2:1").Activate

At least I think that's the right direction, and the statement with which
the problem lies. *Any help would be appreciated.




All times are GMT +1. The time now is 11:30 PM.

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