+ Reply to Thread
Results 1 to 5 of 5

command button- open folder and copy data from .csv file

  1. #1
    Registered User
    Join Date
    01-31-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    7

    command button- open folder and copy data from .csv file

    hi all,

    i have some problems when i want to copy data from other files.

    I want to use Command button to open specific folder, which contains .csv files. When i'll choose one of the files the aplication should put all the data from the file to an excel sheet 1.

    could you pls help me with this?

    thx a lot

  2. #2
    Registered User
    Join Date
    01-31-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: command button- open folder and copy data from .csv file

    at the moment i have this:

    Private Sub CommandButton1_Click()
    ChDrive "C:\data"
    sGetOpenFile = Application.GetOpenFilename("CSV Files (*.csv), *.csv")
    End Sub

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: command button- open folder and copy data from .csv file

    Do you want to copy the data from multiple csv files or just 1?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    01-31-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: command button- open folder and copy data from .csv file

    data from one file in one sheet
    so if i have 5 files i need to have 5sheets in one workbook

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: command button- open folder and copy data from .csv file

    Use this code -
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1