> >> mystring = myfolder & startname & i & endname
> >> MsgBox mystring
> >> With ActiveSheet.QueryTables.Add(**Connection:="TEXT;" _
> >> & mystring & ".csv", Destination:=Range("A1"))
>
> >>
To 3
>> mystring = myfolder & startname & i & endname
>> MsgBox mystring
>> With ActiveSheet.QueryTables.Add(**Connection:="TEXT;" _
>> & mystring & ".csv", Destination:=Range("A1"))
>>
>> 'your stuff
>>
e.'
>> for i= 1 to 3
>> Sheets("sourcesheet").**QueryTables.Add(Connection:= _
>> "TEXT;Path to my file" & I &".csv", Destination:=
>> sheets("sourcesheet).range("**a1")
>> 'etc
>> copy range("
to other sheet
next i
end sub
-Original Message-
From: Seba
Sent: Wednesday, October 05, 2011 10:51 AM
To: MS EXCEL AND VBA MACROS
Subject: Re: $$Excel-Macros$$ prompting for files for data import
Thank you for your help, however, if I understand your suggestion
correctly, this would s
t; "TEXT;Path to my file" & I &".csv", Destination:=
> > sheets("sourcesheet).range("a1")
> > 'etc
> > copy range("a2:z4") sheets("destinationsheet").range("a1")
> >
> > next i
> >
&g
ot;sourcesheet").QueryTables.Add(Connection:= _
> "TEXT;Path to my file" & I &".csv", Destination:=
> sheets("sourcesheet).range("a1")
> 'etc
> copy range("a2:z4") sheets("destinationsheet").range("a1"
urcesheet).range("a1")
'etc
copy range("a2:z4") sheets("destinationsheet").range("a1")
next i
-Original Message-
From: Seba
Sent: Wednesday, October 05, 2011 4:37 AM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ prompting for files for da
Hi all,
I have to import data from 3 different files into 1 and format the
data. Since everything is more or less fixed, I have recorded the
macro below and removed the code for scrolling and such. The only
problem for me is that each month the locations and filenames of the
files to import are ch