Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening a list of workbooks
I have a list of workbooks in a worksheet that I'd like to open
automatically. How would I do that using VB? Thanks, Barb Reinhardt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening a list of workbooks
Dim bk() as Workbook
redim bk(0 to selection.count - 1) i = 0 for each cell in selection set bk(i) = Workbooks.Open(cell.Value) Next This assumes the cells contain the fully qualified path as well if it is required to find the workbook. -- Regards, Tom Ogilvy "Barb Reinhardt" wrote in message ... I have a list of workbooks in a worksheet that I'd like to open automatically. How would I do that using VB? Thanks, Barb Reinhardt |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening a list of workbooks
What if I define the name DEFECT for the series, what would need to be
changed? "Tom Ogilvy" wrote in message ... Dim bk() as Workbook redim bk(0 to selection.count - 1) i = 0 for each cell in selection set bk(i) = Workbooks.Open(cell.Value) Next This assumes the cells contain the fully qualified path as well if it is required to find the workbook. -- Regards, Tom Ogilvy "Barb Reinhardt" wrote in message ... I have a list of workbooks in a worksheet that I'd like to open automatically. How would I do that using VB? Thanks, Barb Reinhardt |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening a list of workbooks
Dim rng as Range
Dim bk() as Workbook set rng = Range("Defect") redim bk(0 to rng.count - 1) i = 0 for each cell in rng set bk(i) = Workbooks.Open(cell.Value) Next at some point for i = lbound(bk) to ubound(bk) bk(i).close SaveChanges:=False Next -- Regards, Tom Ogilvy "Barb Reinhardt" wrote in message ... What if I define the name DEFECT for the series, what would need to be changed? "Tom Ogilvy" wrote in message ... Dim bk() as Workbook redim bk(0 to selection.count - 1) i = 0 for each cell in selection set bk(i) = Workbooks.Open(cell.Value) Next This assumes the cells contain the fully qualified path as well if it is required to find the workbook. -- Regards, Tom Ogilvy "Barb Reinhardt" wrote in message ... I have a list of workbooks in a worksheet that I'd like to open automatically. How would I do that using VB? Thanks, Barb Reinhardt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening new workbooks | Excel Discussion (Misc queries) | |||
Opening Multiple Workbooks | Excel Discussion (Misc queries) | |||
Opening workbooks | Excel Discussion (Misc queries) | |||
opening workbooks on startup | Excel Discussion (Misc queries) | |||
Opening Workbooks Mininmized | New Users to Excel |