Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying ranges of cells from closed workbooks?


I've browsed/searched here and have found similar topics, but I'm not
following the implementation of them so well...

I have 5 or 6 workbooks that I'd like to be combining the contents of
into one master workbook. They're all exactly the same, and each
workbook is made up of 9 worksheets. 5 of the sheets in each book are
time sheets where employees hours are listed, and 1 of the sheets is a
page where employees data is entered. The info entered into that page
propogates the other 5 hour pages in columns on the left side so that
on the time sheets all that can be entered is hour totals for the
week.

To get it all into a master workbook, I just need to copy the same data
ranges from each workbook per worksheet. I'm certain it's possible, and
I can customize it if I have a decent template; I'm just having trouble
getting started.

More info: The employee data range is up to almost 200 rows, but data
within those may only be, say, the first five rows. Is there a way to
return/copy/paste only the rows that have data in them, allowing maybe
two spaces (empty rows) between each workbook copied into the master
workbook?

It seems like a tall order, but I'm sure it can be done and I'm hoping
to do it!

Thanks :)


--
JHongTurney
------------------------------------------------------------------------
JHongTurney's Profile: http://www.excelforum.com/member.php...o&userid=29369
View this thread: http://www.excelforum.com/showthread...hreadid=490814

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Copying ranges of cells from closed workbooks?

You will have to open the Excel workbooks... but can iopen them in hidden
mode so they don't actually appear on the screen.

Do a search for programatically accessing Excel. It should give you some
links to some code snippets that show you how to open another workbook
without displaying it.

This site might also help. http://www.vba-programmer.com/

Here is a block of code I have used to open a "database" excel file and read
data from it...

<<
WB_OpenFile = Application.GetOpenFilename()

If WB_OpenFile = False Then Exit Sub ' Exit process if Cancel is
selected
On Error GoTo bad_file_open
Workbooks.Open Filename:=WB_OpenFile
bad_file_name:
<<


The other option would be to write a Visual Basic program that opens all of
the Excel workbooks and reads and writes the data without ever viewing the
workbooks. This might be a more flexible implementation.

Brian




"JHongTurney"
wrote in message
...

I've browsed/searched here and have found similar topics, but I'm not
following the implementation of them so well...

I have 5 or 6 workbooks that I'd like to be combining the contents of
into one master workbook. They're all exactly the same, and each
workbook is made up of 9 worksheets. 5 of the sheets in each book are
time sheets where employees hours are listed, and 1 of the sheets is a
page where employees data is entered. The info entered into that page
propogates the other 5 hour pages in columns on the left side so that
on the time sheets all that can be entered is hour totals for the
week.

To get it all into a master workbook, I just need to copy the same data
ranges from each workbook per worksheet. I'm certain it's possible, and
I can customize it if I have a decent template; I'm just having trouble
getting started.

More info: The employee data range is up to almost 200 rows, but data
within those may only be, say, the first five rows. Is there a way to
return/copy/paste only the rows that have data in them, allowing maybe
two spaces (empty rows) between each workbook copied into the master
workbook?

It seems like a tall order, but I'm sure it can be done and I'm hoping
to do it!

Thanks :)


--
JHongTurney
------------------------------------------------------------------------
JHongTurney's Profile:

http://www.excelforum.com/member.php...o&userid=29369
View this thread: http://www.excelforum.com/showthread...hreadid=490814



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
Stop named ranges from copying into other workbooks Mike Excel Worksheet Functions 1 April 2nd 08 04:23 PM
Creating ranges in closed workbooks without #REF errors Conor Excel Discussion (Misc queries) 0 June 26th 07 04:22 PM
Copying From Closed Workbooks Mike Excel Worksheet Functions 3 September 6th 06 06:33 PM
How to access ranges in closed workbooks in custom functions Deepak Agarwal Excel Programming 3 July 9th 04 01:59 PM
Copying Data from closed workbooks Kevin G Excel Programming 4 July 31st 03 03:46 PM


All times are GMT +1. The time now is 02:09 PM.

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

About Us

"It's about Microsoft Excel"