Merging Workbooks in Excel 2004 for Mac

R

ryantake

Hi there,

I have been trying to splice together various pieces of VBA code off
the web for this problem, but it always seems that there's some PC-
unique element that throws me off (ie: .dll file requirements). So
hopefully you can help this poor Mac user.

I generate folders of excel workbooks with one worksheet of data
each. I want excel to ask the user which directory they want (via a
dialog box), then take the workbooks in that directory and combine
them so that there is one final workbook with all of the worksheets
from that directory.

To avoid confusion, let me give you a generic example. I have 3
directories of excel files on the desktop (A, B, and C). The first
event I want the macro to do is prompt the user for which directory
they want to work with. So a dialog box pops up, and I can navigate
to directory B in the tree. Now, in directory B there are 4 workbooks
(a, b, c, & d). Each workbook has one worksheet. The worksheet name
is the same as the workbook name for each file (a, b, c, & d). I want
the macro to end up with a master workbook that has four worksheets
(a, b, c, & d), one from each of the original workbooks.

I'm sorry to be so long-winded, but I guess I wanted to be too
informative rather not not informative enough. Thanks so much for
taking some time to read this.

Ryan
 
J

Jim Gordon MVP

Hi,

Have you tried GetOpenFileName ?

-Jim


Hi there,

I have been trying to splice together various pieces of VBA code off
the web for this problem, but it always seems that there's some PC-
unique element that throws me off (ie: .dll file requirements). So
hopefully you can help this poor Mac user.

I generate folders of excel workbooks with one worksheet of data
each. I want excel to ask the user which directory they want (via a
dialog box), then take the workbooks in that directory and combine
them so that there is one final workbook with all of the worksheets
from that directory.

To avoid confusion, let me give you a generic example. I have 3
directories of excel files on the desktop (A, B, and C). The first
event I want the macro to do is prompt the user for which directory
they want to work with. So a dialog box pops up, and I can navigate
to directory B in the tree. Now, in directory B there are 4 workbooks
(a, b, c, & d). Each workbook has one worksheet. The worksheet name
is the same as the workbook name for each file (a, b, c, & d). I want
the macro to end up with a master workbook that has four worksheets
(a, b, c, & d), one from each of the original workbooks.

I'm sorry to be so long-winded, but I guess I wanted to be too
informative rather not not informative enough. Thanks so much for
taking some time to read this.

Ryan

--
Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top