Re: $$Excel-Macros$$ prompting for files for data import

2011-10-06 Thread Seba
> >> mystring = myfolder & startname & i & endname > >> MsgBox mystring > >> With ActiveSheet.QueryTables.Add(**Connection:="TEXT;" _ > >> & mystring & ".csv", Destination:=Range("A1")) > > >> &#

Re: $$Excel-Macros$$ prompting for files for data import

2011-10-05 Thread Sam Mathai Chacko
To 3 >> mystring = myfolder & startname & i & endname >> MsgBox mystring >> With ActiveSheet.QueryTables.Add(**Connection:="TEXT;" _ >> & mystring & ".csv", Destination:=Range("A1")) >> >> 'your stuff >>

Re: $$Excel-Macros$$ prompting for files for data import

2011-10-05 Thread Sam Mathai Chacko
eet > > 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

Re: $$Excel-Macros$$ prompting for files for data import

2011-10-05 Thread dguillett1
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

Re: $$Excel-Macros$$ prompting for files for data import

2011-10-05 Thread Sam Mathai Chacko
I'm sure you can modify this... Sub uvoz_podatkov() ' ' uvoz_podatkov Makro ' ' Dim strFile As String strFile = Application.GetOpenFilename("Comma Separated Value Files (*.csv), *.csv", , "Select first file", , False) If strFile = "False" Then Exit Sub End If With Act

Re: $$Excel-Macros$$ prompting for files for data import

2011-10-05 Thread Seba
Thank you for your help, however, if I understand your suggestion correctly, this would still open files from one and only location? In my case, the source files are in different locations every month and have different endings in their names: DATA_20110101, DATA_20110201, etc... That is why I nee

Re: $$Excel-Macros$$ prompting for files for data import

2011-10-05 Thread dguillett1
The example you provide makes it fairly easy for i= 1 to 3 Sheets("List" & 1).QueryTables.Add(Connection:= _ "TEXT;Path to my file" & I &".csv", Destination:= sheets("List" & 1).range("a1") 'etc next i However, you can probably do it with ONE query table using the variables and have your mac