Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening Multiple Workbooks from a macro with a twist
I have 5 large excel files approx 12Mb each in a folder and I am trying to
access them programmatically from another excel file in the same directory (a report template). When I call code to open them like Workbooks.Open Filename:=sName (thanks tom) it takes a very long time, like the computer is running out of memory. Is there a way for excel to access the Workbook-Worksheet programmatically without actually opening the excel file? I need to process all of the excel files from a separate one rather than sticking the same macro in each file. this is doing my head in Any help greatly appreciated Cheers Doug |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening Multiple Workbooks from a macro with a twist
If you doing more than reading data from the files, you will need to open
them. -- Regards, Tom Ogilvy "Doug" wrote in message ... I have 5 large excel files approx 12Mb each in a folder and I am trying to access them programmatically from another excel file in the same directory (a report template). When I call code to open them like Workbooks.Open Filename:=sName (thanks tom) it takes a very long time, like the computer is running out of memory. Is there a way for excel to access the Workbook-Worksheet programmatically without actually opening the excel file? I need to process all of the excel files from a separate one rather than sticking the same macro in each file. this is doing my head in Any help greatly appreciated Cheers Doug |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening Multiple Workbooks from a macro with a twist
I have a button with a macro attached in a seperate workbook that opens 9
different workbooks ranging from 3 Mb to 29 Mb, refreshes them, saves and closes This is part of my code ChDir "\\Usnt36\nalogistics\Nato rail\REPORTS\RFMS Access Database\Metrics database" Workbooks.Open Filename:="\\USNT36\nalogistics\Nato Rail\Reports\RFMS Access Database\Metrics Database\Metrics Total Plastics Fleet.xls", _ WriteResPassword:="rfms", Password:="rfms" ActiveWorkbook.RefreshAll ActiveWindow.SelectedSheets.PrintOut Copies:=1 ActiveWorkbook.Save ActiveWorkbook.Close Workbooks.Open Filename:="\\USNT36\nalogistics\Nato Rail\Reports\RFMS Access Database\Metrics Database\Metrics Total Tank & Hopper Car Fleet.xls", _ WriteResPassword:="rfms", Password:="rfms" ActiveWorkbook.RefreshAll ActiveWindow.SelectedSheets.PrintOut Copies:=1 ActiveWorkbook.Save ActiveWorkbook.Close etc... for each workbook. It works like a charm. "Tom Ogilvy" wrote: If you doing more than reading data from the files, you will need to open them. -- Regards, Tom Ogilvy "Doug" wrote in message ... I have 5 large excel files approx 12Mb each in a folder and I am trying to access them programmatically from another excel file in the same directory (a report template). When I call code to open them like Workbooks.Open Filename:=sName (thanks tom) it takes a very long time, like the computer is running out of memory. Is there a way for excel to access the Workbook-Worksheet programmatically without actually opening the excel file? I need to process all of the excel files from a separate one rather than sticking the same macro in each file. this is doing my head in Any help greatly appreciated Cheers Doug |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening Multiple Workbooks | Excel Discussion (Misc queries) | |||
Opening Multiple Workbooks | Excel Programming | |||
multiple workbooks opening | Excel Programming | |||
Opening multiple workbooks | Excel Programming | |||
Opening Multiple Workbooks | Excel Programming |