Opening 3 different files with VBA

kenman

Board Regular
Joined
Jan 27, 2005
Messages
85
Hello, I'm a VBA user wannabe, trader, and am really interested in learning about all the possibilites wuth Excel. What a great program, now that I've touched the service and have read part of your "VBA and Macros for microsoft Excel"
I'm trying to write a vba macro on a master sheet that will open, go through or at least let me answer the questions about delimeters, date columns, etc., for 3 different files. The files are updated daily, with the date at the end of the file name changing showing the current date, the beginning part of the name different based on where it's coming from, and teh extension different for 3 different files.
The 3 different files are loaded onto 3 different sheets in the same workbook..
Is there any way to, if nothing else, get the program to open where the file is, pause the program so that I can get the 3 files loaded into my workbook, so that I can run the VBA programs I have on the 3 different sheets?

Thanks, you've got a great site and I look forward to learning more as I go along...
kenman
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Tazguy37

MrExcel MVP
Joined
May 28, 2004
Messages
4,237
Welcome to the Board!

Have you looked at the OpenText method? (Example from VBA Help follows):
Code:
Workbooks.OpenText filename:="DATA.TXT", _
    dataType:=xlDelimited, tab:=True

You can just open the files in your code (though they'll most likely go into their own windows). But you can move the sheets to a single workbook if you need to after they've been imported.

Hope that helps!
 

kenman

Board Regular
Joined
Jan 27, 2005
Messages
85
Hi Taz, Thanks for the info, I'll give it a try and see what happens..
 

Forum statistics

Threads
1,148,229
Messages
5,745,483
Members
423,953
Latest member
MrC54

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top