Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening Multiple Workbooks SJT Excel Discussion (Misc queries) 1 June 6th 06 06:32 PM
Opening Multiple Workbooks MikeE Excel Programming 9 June 21st 05 08:21 PM
multiple workbooks opening jtr Excel Programming 3 June 3rd 04 10:08 PM
Opening multiple workbooks ianripping[_8_] Excel Programming 2 January 21st 04 05:50 PM
Opening Multiple Workbooks MISMitch Excel Programming 1 August 25th 03 05:29 PM


All times are GMT +1. The time now is 05:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"