ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I look at other documents? (https://www.excelbanter.com/excel-programming/371893-how-do-i-look-other-documents.html)

sax

How do I look at other documents?
 
I'm attempting to create a set of spreadsheets that will be generated
automatically based on a master spreadsheet (i.e. taking a master schedule
for six people and having excel automatically generate the six individual
schedule). What would the command line be to refrence a different document
or a different sheet in the same document?

Die_Another_Day

How do I look at other documents?
 
Many options here
Workbooks:
Dim wb as Workbook
Set wb = Workbooks("Book1.xls")
wb.Activate

Workbooks("Book1.xls").Activate

Windows("Book1.xls").Activate

Worksheets:
Dim ws as Worksheet
Set ws = Workbooks("Book1.xls").Sheets("Sheet1")
ws.Activate

Workbooks("Book1.xls").Sheets("Sheet1").Activate

Workbooks("Book1.xls").Sheets(1).Activate

I hope one of these methods works for you.

Charles

Sax wrote:
I'm attempting to create a set of spreadsheets that will be generated
automatically based on a master spreadsheet (i.e. taking a master schedule
for six people and having excel automatically generate the six individual
schedule). What would the command line be to refrence a different document
or a different sheet in the same document?




All times are GMT +1. The time now is 01:03 AM.

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