Re: Downloading multiple files
- From: "Mark Ivey" <wmivey@xxxxxxxxxxxxxxx>
- Date: Fri, 18 Nov 2005 05:00:17 -0600
|
Lee,
I was doing something similar with a project of mine at work. Here are the
basics to get it going...
Sub
Sheets("Sheet1").Select
Range("A1").Select
Application.ScreenUpdating = False
Call OpenFiles
Application.ScreenUpdating = True End Sub Sub OpenFiles()
Dim fn As Variant, f As Integer, i As Integer, counter As
Integer
i = 1
fn = Application.GetOpenFilename("
1, "Select One Or More Files To Open", ,
True)
If TypeName(fn) = "Boolean" Then Exit
Sub
For f = 1 To UBound(fn)
Debug.Print "Selected file #" & f & ": " &
fn(f)
Workbooks.Open fn(f)
While i = 1
Range("A1:J1").Select
Selection.Copy Windows("Work_basic version.xls").Activate 'Change the filename to match yours
Range("A1").Select
ActiveSheet.Paste i
= i + 1
Wend If
(f > 1) Then
While (i <= f)
Range("A1:J1").Select
Selection.Copy Windows("Work_basic version.xls").Activate 'Change the filename to match yours
Range("A1:J1").Select Cells(i,
1).Select
ActiveSheet.Paste
i = i + 1
Wend End
If
ActiveWindow.ActivateNext
ActiveWindow.Close False
Next f End Sub
|
- Follow-Ups:
- Re: Downloading multiple files
- From: tekman
- Re: Downloading multiple files
- References:
- Downloading multiple files
- From: tekman
- Downloading multiple files
- Prev by Date: RE: Disable Right Clicking of Excel logo on Standard menu Bar
- Next by Date: Re: Excel to browser file
- Previous by thread: RE: Downloading multiple files
- Next by thread: Re: Downloading multiple files
- Index(es):
Relevant Pages
|