Dear Ajjw, Please try............. and see attached sheet..
*Sub import_csvfile() On Error GoTo abc Dim csvfile csvfile = Application.GetOpenFilename("CSV (*.CSV),*.CSV", , "Please select CSV file...") Workbooks.OpenText Filename:=csvfile, Origin:=xlWindows, StartRow:=1 With ActiveWorkbook ActiveSheet.Move After:=.Worksheets(.Worksheets.Count) End With abc: Exit Sub End Sub * -- Thanks & regards, Noorain Ansari *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> *http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/> On Mon, Sep 19, 2011 at 7:19 PM, ajjw123 <ajjw...@gmail.com> wrote: > i am very new to vba programming in excel. > So pls help me > I would like to import a csv file daily into a fixed workbook by > asking the name of the csv file from the user. > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
Import_CSV_File.xlsm
Description: Binary data