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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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!
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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
Back
Top